解决unable to locate package net-tools

解决unable to locate package net-tools




本文转载于解决unable to locate package net-tools,如有帮助请关注点赞原作者。


今天要在linux中执行ifconfig命令,命令无效,然后安装网络包,执行 sudo apt-get updatesudo apt install net-tools,报如下错误:unable to locate package net-tools,可以确定自己的源sources.list有问题,但是从网上找了很多的源,一直解决不了问题,最终找到下面的源解决了问题。

ubuntu版本:17.04

进入源:sudo vi sources.list,将下列内容替换sources.list中的内容,并保存

deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe

sources.list替换完后,重新执行sudo apt-get updatesudo apt install net-tools,然后就可以执行ifconfig了。完美解决!!!

猜你喜欢

转载自blog.csdn.net/weixin_51524504/article/details/129729102