docker 环境下Unable to locate package vim

背景

在使用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 有没有

apt-get update

再安装 Vim 即可。

原文地址:https://www.cnblogs.com/psyco/p/14868160.html