在使用docker容器时,有时候里边没有安装vim,敲vim命令时提示说:vim: command not found,这个时候就需要安装vim,可是当你敲apt-get install vim命令时,提示:

        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        E: Unable to locate package vim

        这时候需要敲:apt-get update

这个命令的作用是:同步 /etc/apt/sources.list /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包。

        等更新完毕以后再敲命令:

 apt-get install vim       安装vim

 apt-get install  telnet   安装telnet

 apt-get install  net-tools   安装ifconfig 

apt install iputils-ping   安装ping

 

相关文章:

  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-09-29
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2021-08-03
  • 2021-11-29
  • 2021-09-08
相关资源
相似解决方案