Home  >  Q&A  >  body text

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 days ago953

reply all(2)I'll reply

  • 黄舟

    黄舟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 yet been created or been moved out of incoming.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.

    部分软件包未能安装。这是由于你的请求存在未知性或是你正在使用一个不稳定软件包(软件包的依赖软件还没有被加入软件仓库或者已经从软件仓库中移除)

    Some software packages could not be installed. This is because your request is unknown or you are using an unstable software package (the dependent software of the software package has not been added to the software repository or has been removed from the software repository)

    Try to modify the version of the corresponding dependent software package.

    In addition, when using system images, it is recommended to use the pure version on Docker Hub. 🎜

    reply
    0
  • 阿神

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

    The reason for the not to be installed problem is that the version on the repo is not as new as your local version, so it will not be installed. Is your source version wrong? For example, this problem will occur when ubuntu xenial uses the ubuntu trusty source.

    reply
    0
  • Cancelreply