从运行jessie的Debian docker容器中我得到
vi blah
bash: vi: command not found
所以自然而然地到达了我的安装命令
sudo apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vim
在寻找牵引力时,我遇到了这些建议,并给出了各种结果
cat /etc/apt/sources.list
deb http://deb.debian.org/debian jessie main
deb http://deb.debian.org/debian jessie-updates main
deb http://security.debian.org jessie/updates main
apt-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package software-properties-common
apt-get install python-software-properties
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-software-properties
apt-get install apt-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apt-file
由于此服务器是mongo映像的docker容器,因此有意进行Debian的裸露安装...安装vi只是在开发期间进行
我找到了这个解决方案
apt-get update
apt-get install apt-file
apt-file update
apt-get install vim # now finally this will work !!!
这是上面的副本N粘贴版本
apt-get update && apt-get install apt-file -y && apt-file update && apt-get install vim -y
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句