docker容器中安装vim,报错“vim: command not found“的解决办法

场景

docker容器中,使用vim命令时vim test.txt提示:vim: command not found

解决办法

  1. 使用apt install vim命令安装vim。如果安装时提示如下:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package vim
  1. 那么使用apt update命令更新最新的软件包
  2. 更新完成以后再使用命令apt install vim命令即可

猜你喜欢

转载自blog.csdn.net/weekdawn/article/details/123993514