Skip to main content
 首页 » 编程设计

ruby-on-rails之Nginx 和乘客依赖问题( digital ocean 部署)

2024年12月31日23grandyang

我正在尝试遵循本指南

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-nginx-on-ubuntu-14-04

当我想在运行此命令后继续本教程时:

sudo apt-get install nginx-extras passenger 

我收到此错误:
Reading package lists... Done 
Building dependency tree 
 
Reading state information... Done 
passenger is already the newest version. 
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: perlapi-5.18.2 but it is not installable 
Depends: libperl5.18 (>= 5.18.2) but it is not installable 
Recommends: passenger (< 4.0.60) but 1:4.0.59-1~trusty1 is to be installed 
E: Unable to correct problems, you have held broken packages. 

我想我无法安装 nginx-extras,有人可以帮助我吗?

请您参考如下方法:

我在 Ubuntu 14.10 上遇到了同样的问题

sudo nano /etc/apt/sources.list.d/passenger.list 

注释掉 deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main
ctrl+x

进入
sudo apt-get update 
 
sudo apt-get install nginx nginx-extras 

那么如果可以
sudo nano /etc/apt/sources.list.d/passenger.list 

插入 deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
ctrl+x

进入
sudo apt-get update 
 
sudo apt-get install passenger 

瞧!