Elmor
Elmor

Reputation: 4895

passenger-install-apache2-module fails on ubuntu 12.04

I've installed gem install passenger for my rails app. Now I try passenger-install-apache2-module.

I get errors screen:

Installation instructions for required software

  • To install Apache 2 development headers: Please run apt-get install apache2-prefork-dev as root.
  • To install Apache Portable Runtime (APR) development headers: Please run apt-get install libapr1-dev as root.
  • To install Apache Portable Runtime Utility (APU) development headers: Please run apt-get install libaprutil1-dev as root.

When I run sudo apt-get install apache2-prefork-dev, I get

The following packages have unmet dependencies: apache2-prefork-dev : Depends: apache2.2-common (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.1 is to be installed.
E: Unable to correct problems, you have held broken packages.

When I run sudo apt-get update, it doesn't solve anything. The error still exists.

Upvotes: 13

Views: 9241

Answers (4)

where_
where_

Reputation: 301

Try this:

sudo apt-get install apache2-dev

I did that and passenger-install-apache2-module was able to pass the mentioned errors.

Upvotes: 14

Andreas Baumgart
Andreas Baumgart

Reputation: 2747

There is also a pre-made package for passenger in the Precise repo:

apt-get install libapache2-mod-passenger

Upvotes: 0

tuomassalo
tuomassalo

Reputation: 9091

For me, the fix was to re-enable the precise-updates repository - I had disabled it in the Update Manager - and updating the system after that.

(I would have liked to only install important security updates, that's why I had disabled it in the first place.)

Upvotes: 4

thisfeller
thisfeller

Reputation: 798

Try

sudo apt-get -f install
sudo apt-get clean all
sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade

Then retry installing apache, plus all the dev packages. You may have to uninstall apache first.

Upvotes: 4

Related Questions