Reputation: 251
Im trying to follow this guide
When I want to continue with the tutorial after running this command:
sudo apt-get install nginx-extras passenger
I get this error:
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.
I think that I can't install nginx-extras, Somebody can help me please?
Upvotes: 25
Views: 13704
Reputation: 7549
Maybe ubuntu version error,try with this command:
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list'
Upvotes: 0
Reputation: 1977
If you are on Ubuntu 16.04 do the following
# Install our PGP key and add HTTPS support for APT
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
sudo apt-get install -y apt-transport-https ca-certificates
# Add our APT repository
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update
# Install Passenger + Nginx
sudo apt-get install -y nginx-extras passenger
Upvotes: 33
Reputation: 83
When i got this error it was because the version of passenger i was trying to install didn't match the version of ubuntu. Check you are on ubuntu 14.04.
If not the line deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main
in /etc/apt/sources.list.d/passenger.list
needs to change to match your version of ubuntu.
Then run sudo apt-get update
Upvotes: 2
Reputation: 777
I used nginx-full
instead of nginx-extras
because of this very issue. I'm running 14.10 because I want Postgres 9.4.
There were a bunch of weird errors that I kept getting, and I accidentally kept following the Passenger directions past the APT instructions. Whoops. So I originally followed @Maciej-adamczewski 's answer, but he is adding a Debian 7 passenger install instead of an Ubuntu 14.04 install. This messed me up.
Here's what I did to get me sorted:
sudo apt-mark showhold # apparently I had nothing in here
sudo apt-get autoclean
sudo apt-get update && sudo apt-get upgrade
# I hoped upgrade would get rid of that error re: nginx-extras
# it didn't at all, so decided to scrap and start over
sudo apt-get purge nginx* # to get rid of everything nginx
sudo apt-get remove nginx* # paranoia
sudo apt-get purge passenger
sudo apt-get remove passenger # paranoia again
sudo apt-get autoremove
sudo apt-get update
sudo apt-get install nginx-full passenger
Boom! Got nginx to run properly.
It doesn't say on the Digital Ocean piece but if you installed RVM instead of ruby directly, you'll need to find out where your rvm ruby is:
rvm use
passenger-config --ruby-command
And then copy paste the nginx info that says passenger_ruby /usr/local/...
and override the original passenger_ruby line in your /etc/nginx/nginx.conf
file.
Later on, when you create sites, make sure you add in passenger_enabled on;
in your server block for nginx!
mad props to this dude: Setting up rails on DO
Upvotes: 3
Reputation: 856
I had the same problem on Ubuntu 14.10
sudo nano /etc/apt/sources.list.d/passenger.list
comment out
deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main
ctrl+x
Y
enter
sudo apt-get update
sudo apt-get install nginx nginx-extras
then if ok
sudo nano /etc/apt/sources.list.d/passenger.list
insert
deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
ctrl+x
Y
enter
sudo apt-get update
sudo apt-get install passenger
Voila !
Upvotes: 73