Ruby-on-rails – passenger-install-apache2-module fails on ubuntu 12.04

ruby-on-railsUbuntu

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.

Best Answer

Try this:

sudo apt-get install apache2-dev

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

Related Topic