首頁  >  問答  >  主體

linux - docker容器中的apt-get无法自动安装依赖是怎么回事?

来源为网易蜂巢的Ubuntu镜像,uname信息为:
Linux 524d88101d4e 3.13.0-86-generic #130-Ubuntu SMP Mon Apr 18 18:27:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

以root权限登录,发现apt-get在安装某些程序时无法自动安装依赖。比如apt-get install nginx就可以正常安装,但是安装perl就会出现这个问题:

会显示perl缺乏依赖,可是当我手动安装依赖perl-base时:

则会显示perl-base已经安装好且是最新版本。再安装perl依然提示依赖不全。

请问这是什么原因呢?

注:apt-get用的是网易的源,且每次安装之前都进行了apt-get update

ringa_leeringa_lee2743 天前959

全部回覆(2)我來回復

  • 黄舟

    黄舟2017-04-17 16:38:23

    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 vedinween 3. 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.

    部分软件包未能安装。这是由于你的请求存在未知性或是你正在使用一个不稳定软件包(软件包的依赖软件还没有被加入软件仓库或者已经从软件仓库中移除)部分軟體包未能安裝。這是由於你的請求存在未知性或是你正在使用一個不穩定軟體包(軟體包的依賴軟體還沒有被加入軟體倉庫或已經從軟體倉庫移除)

    嘗試修改對應依賴軟體包的版本。

    另外,使用系統映像還是建議使用Docker Hub上的純淨版。

    回覆
    0
  • 阿神

    阿神2017-04-17 16:38:23

    not to be installed這個問題的原因是repo上的版本不如你本地的版本新,所以不會被安裝,你是不是源的版本錯了,例如ubuntu xenial使用ubuntu trusty的源就會出現這個問題。

    回覆
    0
  • 取消回覆