欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

docker 容器内apt-get install 报E: Unable to locate package xxx问题解决

程序员文章站 2022-07-15 12:58:36
...

现象: 

apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package vim

解决

[email protected]:/# mv /etc/apt/sources.list /etc/apt/sources.list.bak
[email protected]:/# echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list
[email protected]:/# echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list
[email protected]:/# echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list
[email protected]:/# echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list

执行

apt-get update

后在执行安装其他软件包

 

参考来源:https://blog.csdn.net/mameng1988/article/details/83782831

上一篇: Sowu高精度详解

下一篇: JAVA Exception