环境
ubuntu1804宿主机 + docker + ubuntu1804容器
问题回顾
- 打算在新的容器中测试一下某个库,于是新开了一个容器.
docker run -tid -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/admin/temp:/home/admin/temp --net=host -m 2g -e DISPLAY=unix$DISPLAY -e GDK_SCALE -e GDK_DPI_SCALE --name gstreamer_test1 ubuntu:latest
- 进入容器
apt-update
- 执行
apt-get install vim
- 然后将源文件中本来的内容全部删除,替换成了阿里云的内容.
vi /etc/apt/sources.list
… - 然后
apt-get update
- 然后下载某些包,如
apt-get install autoconf
- 报错:
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: autoconf : Depends: perl (> 5.005) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
debug过程
经过一段时间的搜索,并没有找到解决的方法.
尝试如果不更换成阿里源,使用本来的源的话,
那么是可以正常安装的.
未解决
目前只能在某些包不能下载的时候,尝试更换不同的源,看能否解决问题.
如果哪位大兄弟知道如何彻底解决这类问题的话,请指教!