无法在 nginx 1.7.9 上通过 apt-get 安装 nginx-extras 包

无法在 nginx 1.7.9 上通过 apt-get 安装 nginx-extras 包

我正在尝试在 Ubuntu dev box 上安装 Phusion Passenger for nginx,如下所示本指南来自乘客网站。

我已经安装并运行 Nginx,版本是 1.7.9-1~trusty。

我正在尝试遵循先决条件:apt-get install nginx-extras但失败并显示错误消息:

Unpacking nginx-common (1:1.6.2-2.4.0.56~trusty1) ...
dpkg: error processing archive
/var/cache/apt/archives/nginx-common_1%3a1.6.2-2.4.0.56~trusty1_all.deb (--unpack):
  trying to overwrite '/usr/share/nginx/html/index.html', 
  which is also in package nginx 1.7.9-1~trusty
Preparing to unpack .../nginx-extras_1%3a1.6.2-2.4.0.56~trusty1_amd64.deb ...
Unpacking nginx-extras (1:1.6.2-2.4.0.56~trusty1) ...
dpkg: error processing archive 
/var/cache/apt/archives/nginx-extras_1%3a1.6.2-2.4.0.56~trusty1_amd64.deb (--unpack):
  trying to overwrite '/usr/sbin/nginx',
  which is also in package nginx 1.7.9-1~trusty
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx-common_1%3a1.6.2-2.4.0.56~trusty1_all.deb
/var/cache/apt/archives/nginx-extras_1%3a1.6.2-2.4.0.56~trusty1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我相信我拥有的 nginx 版本是直接来自 nginx.org repo 的主线版本。但似乎没有与 nginx-common 或 nginx-extras 等相匹配的版本。有人知道是否有办法安装 1.7.9 的 extras 包吗?它仍然需要吗?或者我需要卸载 1.7.9 并安装 1.6.2 的所有内容吗?

输出apt-cache policy nginx-extras

 nginx-extras:
      Installed: (none)
      Candidate: 1:1.6.2-2.4.0.56~trusty1
      Version table:
         1:1.6.2-2.4.0.56~trusty1 0
            500 https://oss-binaries.phusionpassenger.com/apt/passenger/ trusty/main amd64 Packages
         1.6.2-5+trusty0 0
            500 http://ppa.launchpad.net/nginx/stable/ubuntu/ trusty/main amd64 Packages
         1.4.6-1ubuntu3.1 0
            500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
            500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
         1.4.6-1ubuntu3 0
            500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

相关内容