phusion / passenger_apt_automation

Tools for automatically building a Debian APT repository for Phusion Passenger
MIT License
20 stars 20 forks source link

libnginx-mod-http-passenger on Bionic broken again: Nginx version 1.14.2 is out #29

Closed joeswann closed 5 years ago

joeswann commented 5 years ago

At the end of a slog (long story, writing provisioning scripts), it seems like the latest release of nginx-common is preventing libnginx-mod-http-passenger from installing.

Judging from the closed issues this is happens a bit! Sorry to bring bad news!

sudo apt-get install libnginx-mod-http-passenger
...

The following packages have unmet dependencies:
 libnginx-mod-http-passenger : Depends: nginx-common (< 1.14.1) but 1.14.2-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
CamJN commented 5 years ago

I just checked with a clean bionic install, and do not see this issue. Can you explain your environment a bit?

joeswann commented 5 years ago

Ah. Well in theory its Ubuntu 18.04.1 LTS, but in practise its a Windows Linux Subsystem.

I'll see if I can do a minimum replication in WSL + a straight VM to isolate the issue.

joeswann commented 5 years ago

Soo I tried more or less the exact same thing on a fresh install and it didn't happen ¯\(ツ)

Closing now, will reopen if I run into it again with reproducable steps.

excid3 commented 5 years ago

I have someone that ran into this as well. He's using linode's mirror, so that may have had something to do with it.

Looks to have been the same version.

libnginx-mod-http-passenger : Depends: nginx-common (< 1.14.1) but 1.14.2-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
excid3 commented 5 years ago

I get this from apt-cache policy. Maybe someone accidentally released an nginx-common package that wasn't supposed to and it got installed and then removed from the repo?

root@localhost:~# apt-cache policy nginx-common
nginx-common:
  Installed: 1.14.2-1+ubuntu18.04.1+deb.sury.org+1
  Candidate: 1.14.2-1+ubuntu18.04.1+deb.sury.org+1
  Version table:
 *** 1.14.2-1+ubuntu18.04.1+deb.sury.org+1 100
        100 /var/lib/dpkg/status
     1.14.0-0ubuntu1.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
     1.14.0-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages

I also noticed Linode has a repo for Longview and I saw Longview config in NGINX, so that might be the cause of it.

Soundbytes commented 4 years ago

Here is what happened to me today: (Ubuntu 18.04)

$ sudo apt install libnginx-mod-http-passenger nginx
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:
 libnginx-mod-http-passenger : Depends: nginx-common (>= 1.14.0-0ubuntu1.6) but it is not going to be installed
                               Depends: nginx-common (< 1.14.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I can either install nginx or passenger but not both. I followed the instructions given here: https://www.phusionpassenger.com/library/install/apache/install/oss/bionic/ The above example output was created after purging nginx as well as passenger.

Thanks for any helpful hints and comments!

crimson-knight commented 4 years ago

@Soundbytes I think I've identified the issue here because I've been getting the exact same error while trying to install the latest version of Nginx (1.16.1) + Passenger through apt after adding the Nginx community PPA

If you run sudo apt search nginx-common or whatever package version of nginx you're trying to install, you can see that it's probably listing something like:

nginx-common/bionic 1.16.1-0+bionic1 all
  small, powerful, scalable web/proxy server - common files

This means you're probably sourcing from the Nginx PPA which is a community maintained version of Nginx and not the official version.

This is because for Bionic LTS, only Nginx 1.14.0 in the official repo and that package follows a different naming convention. It would look something like this from the sudo apt search nginx-common

nginx-common/bionic-security,bionic-updates 1.14.0-0ubuntu1.7 all
  small, powerful, scalable web/proxy server - common files

Check if you're using the community Nginx PPA, it would probably be here /etc/apt/sources.list.d/nginx-ubuntu-stable-bionic.list you can just delete that file or comment out all of the lines to to test.

Run sudo apt update after, you can check to make sure you now have the correct version of nginx-common by running sudo apt-cache policy nginx-common. You should see a line 1.14.0-0ubuntu1.7

Then go ahead and run your install command and it should run no problem.

If you want to run the latest version of Nginx from the PPA with Passenger you'll probably need to compile the module from source and add it into Nginx.

I've been able to reliably reproduce this successfully on DigitalOcean droplets, so I hope this helps anyone else running into this issue! :)