5

I am attempting to install Phusion Passenger for nginx on a dev Ubuntu box following this guide from the passenger website.

I have Nginx installed and running already, version is 1.7.9-1~trusty.

I am attempting to follow the prerequisite: apt-get install nginx-extras and this fails with the error message:

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)

I believe the nginx version I have is the mainline version directly from the nginx.org repo. But it doesn't seem like there's a matching version for nginx-common or nginx-extras, etc. Does anyone know if there's anyway to install the extras package for 1.7.9? Is it even still needed? Or will I need to uninstall 1.7.9 and install 1.6.2 of everything?

Output of 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
Neil Neyman
  • 151
  • 1
  • 5
  • Did you perform all of the steps in `2.3.1. Adding our APT repository`? – Paul Jan 02 '15 at 17:12
  • @Paul Yes I added the repo and updated. if I run `sudo apt-cache showpkg nginx-extras` the first result is 1:1.6.2-2.4.0.56~trusty1 from oss-binaries.phusionpassenger.com. Which is the version that's failing in the error above – Neil Neyman Jan 02 '15 at 17:19
  • nginx-extras should *conflict* with the original nginx package; it's nginx compiled with extra modules, not an additional package. The question is: why is it not removing the nginx package at install time. The output of "apt-cache policy nginx-extras" would be interesting here. – Craig Miskell Jan 02 '15 at 18:36
  • @CraigMiskell Pasted the output in the answer above. So given what you said about the extras would it make sense to remove the nginx package first, then install nginx-extras? – Neil Neyman Jan 02 '15 at 18:59
  • Removing the nginx package first is likely to solve the problem, but there is still some underlying package dependency/conflict issue which would be interesting to solve. What's the output of "apt-cache show nginx-extras"? It should show what it depends on/conflicts with. – Craig Miskell Jan 02 '15 at 19:16
  • http://pastebin.com/0PFRjapu is the output of apt-cache show. Looks like the conflicts list does not include the plain "nginx" package -- is that possibly causing the problem? – Neil Neyman Jan 02 '15 at 19:21

0 Answers0