在docker容器中vi指令找不到

  1. 在使用docker容器时,有时候里边没有安装vi,敲vi命令时提示说:vi: command not found,这个时候就需要安装vi,可是当你敲apt-get install vi命令时,提示:  
  2. Reading package lists... Done  
  3. Building dependency tree         
  4. Reading state information... Done  
  5. E: Unable to locate package vi
  6. 这时候需要敲:apt-get update,这个命令的作用是:同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包。  
  7. 等更新完毕以后再敲命令:apt-get install vi命令即可。

对于其他的软件来说 也是相同的

posted @ 2016-11-20 20:39  Hotsum  阅读(19702)  评论(1编辑  收藏  举报