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 即可。

posted @ 2021-06-09 18:38  dadongx  阅读(251)  评论(0编辑  收藏  举报