【问题标题】:Passenger doesn't install with official Ubuntu Nginx package乘客未安装官方 Ubuntu Nginx 软件包
【发布时间】:2014-01-23 17:17:28
【问题描述】:

所以看起来我在使用官方 nginx 软件包安装最近的乘客时遇到了一些问题。根据这里的乘客官方文件:

http://www.modrails.com/documentation/Users%20guide%20Nginx.html#install_add_apt_repo

我已经完成了从 2.3.1 开始的所有工作。我的系统是 Ubuntu 13.10,目前通过 gem 安装了乘客 Nginx。现在我希望将服务更改为使用官方软件包,因为我相信它确实有更好的集成支持,以及对 logrotate 的更好支持。所以当我执行了安装的主要命令时:

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: perl (>= 5.14.2-21+deb7u1) but 5.14.2-21build1 is to be installed
                Depends: libgd2-noxpm (>= 2.0.36~rc1~dfsg) but it is not installable or
                         libgd2-xpm (>= 2.0.36~rc1~dfsg) but it is not installable
                Recommends: passenger (< 4.0.34) but 1:4.0.33-1~wheezy1 is to be installed
E: Unable to correct problems, you have held broken packages.

我想知道为什么以及如何依赖检查如此严格到这种程度。正如它所说,我需要 Debian 的软件包,但我在 Ubuntu 上,所以软件包名称略有不同是很自然的。任何人都可以为此提出任何解决方案吗?非常感谢。

另外,还有一个附带的问题:如果成功了,Nginx 会自动支持 IPv6 吗?

【问题讨论】:

  • 运行apt-cache policy nginx-extras会得到什么
  • nginx-extras: Installed: (none) Candidate: 1.4.1-3ubuntu1.1 Version table: 1.4.1-3ubuntu1.1 0 500 http://ubuntu.bhs.mirrors.ovh.net/ubuntu/ saucy-updates/universe amd64 Packages 500 http://security.ubuntu.com/ubuntu/ saucy-security/universe amd64 Packages 1.4.1-3ubuntu1 0 500 http://ubuntu.bhs.mirrors.ovh.net/ubuntu/ saucy/universe amd64 Packages
  • @wlicpsc 你能分享一下你的/etc/apt/sources.list.d/passenger.list 修复后的样子吗?谢谢。

标签: ruby-on-rails ruby ubuntu nginx passenger


【解决方案1】:

在 2.3.1 的第 3 步中,您是否添加了 Ubuntu 13.10 APT 存储库,而不是 Debian 6/7 APT 存储库?你的 /etc/apt/sources.list.d/passenger.list 是什么样子的?

【讨论】:

  • 与文档在 2.3.2 章节中所写的完全一样。 # Ubuntu 13.10 deb https://oss-binaries.phusionpassenger.com/apt/passenger saucy main # Ubuntu 12.04 deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main # Ubuntu 10.04 deb https://oss-binaries.phusionpassenger.com/apt/passenger lucid main # Debian 7 deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main # Debian 6 deb https://oss-binaries.phusionpassenger.com/apt/passenger squeeze main
  • 文档说明您应该只添加其中的一行,而不是全部。
  • 迷人,成功了!谢谢。这里还有一个关于 Ruby 版本的问题。在安装过程中似乎已经安装了 Ruby 1.9.1 和 2.0 的包,现在我在 RVM 上运行了 2.1.0,那么 Nginx 使用什么版本的 Ruby?会不会有兼容性问题?
  • 我想我在文档中找到了其他内容,在 8.2.2 中,它在单独的站点文件中指定了 RVM 的 ruby​​ 版本,这是标准方法还是我应该更改根配置文件中的路径?
  • 不管你把passenger_ruby放在哪个文件里,只要Nginx正确读取你的配置选项。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-07-12
  • 2012-03-19
  • 1970-01-01
  • 2019-12-21
  • 2020-05-31
相关资源
最近更新 更多