command ‘ifconfig‘ not found, but can be installed with

command 'ifconfig' not found, but can be installed with: sudo apt install net-tools

  • 出错详情
  • 操作

出错详情

我这个错误出现在Ubuntu 18 版本
问题

操作

按提示,执行如下命令:

// command
sudo apt install net-tools

成功则已,但有时会出错,如下:
command ‘ifconfig‘ not found, but can be installed with_第1张图片
以上说明apt被某个进程锁住了,找到进程,kill 就完了,如下:
在这里插入图片描述
接着执行如下命令:在这里插入图片描述
再升级下apt,如下:
在这里插入图片描述
现在执行sudo apt install net-tools命令就可以了!
command ‘ifconfig‘ not found, but can be installed with_第2张图片
最后,ifconfig命令可以正常使用了!

你可能感兴趣的:(服务器,linux,ubuntu,服务器)