安装net-tools的时候出现这个错误
Package ‘net-tools’ has no installation candidate
我的Ubuntu版本是20.04
$ sudo apt install net-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package net-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'net-tools' has no installation candidate
1、先编辑source.list替换成了阿里源
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
2、启用 universe 软件源
在较新的 Ubuntu 版本中,net-tools 位于 universe 软件源
sudo add-apt-repository universe
sudo apt update
3、安装net-tools
sudo apt install net-tools