无法安装程序包

无法安装程序包

我正在尝试安装一些软件包,命令是:

sudo apt-get install nginx-extras passenger

但后来我收到了一个错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
 nginx-extras : Depends: nginx-common (= 1:1.6.2-9.5.0.4~trusty1) but it is not going to be installed
                Depends: perl (>= 5.18.2-2ubuntu1) but 5.14.2-21+deb7u2 is to be installed
                Depends: perlapi-5.18.2 but it is not installable
                Depends: libc6 (>= 2.14) but 2.13-38+deb7u8 is to be installed
                Depends: libgd3 (>= 2.1.0~alpha~) but it is not installable
                Depends: libperl5.18 (>= 5.18.2) but it is not installable
                Recommends: passenger (< 5.0.5) but 1:5.0.4-1~trusty1 is to be installed
 passenger : Depends: libc6 (>= 2.14) but 2.13-38+deb7u8 is to be installed
             Recommends: passenger-doc (= 1:5.0.4-1~trusty1)
             Recommends: passenger-dev (= 1:5.0.4-1~trusty1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我不知道该如何解决这个问题,我确实认为我需要安装一些软件包,但是所有这些呢?

提前致谢!

答案1

我遇到了同样的错误并且已修复。

我想你遵循的指南和我是一样的(https://gorails.com/deploy/ubuntu/14.04),并且这个只有在使用 14.04 时才有效。你使用的是什么版本和发行版?执行 即可找到它cat /etc/*-release

如果您查看 VERSION,它看起来像这样VERSION="7 (wheezy)"。您需要做的下一步是以/etc/apt/sources.list.d/passenger.listroot 身份编辑。因此,您可以sudo vim /etc/apt/sources.list.d/passenger.list更改

deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main

deb https://oss-binaries.phusionpassenger.com/apt/passenger <Your version> main

就我而言

deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main

然后执行“sudo apt-get update”现在你应该能够安装 nginx-extras 乘客

相关内容