Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 573
Elmor Avatar asked Aug 03 '12 09:08

Elmor


3 Answers

Try this:

sudo apt-get install apache2-dev

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

like image 121
where_ Avatar answered Oct 31 '22 15:10

where_


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.)

like image 21
tuomassalo Avatar answered Oct 31 '22 14:10

tuomassalo


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.

like image 3
thisfeller Avatar answered Oct 31 '22 15:10

thisfeller