command ‘ifconfig‘ not found, but can be installed with:解决办法
日期: 2021-04-04 分类: 个人收藏 532次阅读
报错
在ubuntu18.04中,使用ifconfig
命令查看ip地址,但是报错了。
解决
根据提示,使用 sudo apt install net-tools
命令,安装网络工具。
以上说明apt被某个进程锁住了,找到进程,kill 就完了,如下:
强制重新配置软件包,升级下apt,但是又报错。
使用指令sudo rm /var/lib/dpkg/lock-frontend
,sudo rm /var/lib/dpkg/lock
删除占用进程
使用指令sudo apt update
再次尝试更新apt,成功!
使用指令sudo apt install net-tools
安装网络工具。
使用ifconfig
,查看ip
注意:虚拟机的网络链接要设置成桥接模式,桥接到有线网卡。
尝试使用ping命令,本机和虚拟机互ping,成功ping通。
除特别声明,本站所有文章均为原创,如需转载请以超级链接形式注明出处:SmartCat's Blog
精华推荐