当我尝试安装nginx时,软件包未满足

时间:2016-10-31 21:16:31

标签: ubuntu nginx dependencies package passenger

当我尝试运行sudo apt-get install nginx-full时出现此错误:

The following packages have unmet dependencies:
nginx-full : Depends: nginx-extras (>= 1:1.10.1-8.5.0.30~trusty1) but it is not going to be installed
Depends: nginx-extras (< 1:1.10.1-8.5.0.30~trusty1.1~) but it is not going to be installed

所以我运行apt-get install nginx-extras并收到此错误:

The following packages have unmet dependencies:
nginx-extras : Depends: perlapi-5.18.2 but it is not installable
               Depends: libperl5.18 (>= 5.18.2) but it is not installable
               Recommends: passenger (< 5.0.31) but 1:5.0.30-1~wheezy1 is to be installed
E: Unable to correct problems, you have held broken packages.

我该如何解决?

3 个答案:

答案 0 :(得分:3)

也许是ubuntu版本错误,试试这个命令〜

sudo sh -c&#39; echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main&gt; /etc/apt/sources.list.d/passenger.list'

答案 1 :(得分:0)

在设置我的应用https://www.wiki11.com时,我也遇到了同样的问题。

请映射到新的apt存储库以访问Phusion Passenger 4库。

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

然后运行你的命令

sudo apt-get install nginx-extras

答案 2 :(得分:0)

对我来说,我已经通过删除添加的存储库链接解决了这个问题。我已经从我的ubuntu服务器数字海洋中删除了它。

  

sudo rm -rf /etc/apt/sources.list.d/passenger.list