Docker鏡像apt-get提示:E: Unable to locate package vim

不少次在使用docker鏡像時,想使用個vim命令,提示命令不可用。html

因而想着安裝一下就行,結果apt-get提示:docker

E: Unable to locate package vim

直接apt-get update以後再次安裝,也仍是提示這個,有點煩人。ubuntu

因而只能增長一條源地址到/etc/apt/sources.list文件中。vim

# cat /etc/apt/sources.listdeb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch-updates main

# echo deb http://archive.ubuntu.com/ubuntu/trusty main universe restricted multiverse >> /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/trusty main universe restricted multiverse這個地址添加到/etc/apt/sources.list文件中,而後apt-get update更新完以後安裝就能夠了。ide

相關文章
相關標籤/搜索