Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install passenger module with bellow command:

sudo passenger-install-apache2-module

And I am getting following output:

 * GNU C++ compiler... found at /usr/bin/g++
 * Curl development headers with SSL support... found
 * OpenSSL development headers... found
 * Zlib development headers... found
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /usr/bin/rake
 * rack... found
 * Apache 2... found at /usr/sbin/apache2
 * Apache 2 development headers... not found
 * Apache Portable Runtime (APR) development headers... not found
 * Apache Portable Runtime Utility (APU) development headers... not found

And then its asking me to install:

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

But when I am running :

sudo apt-get install apache2-prefork-dev libapr1-dev libaprutil1-dev 


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:
  apache2-prefork-dev: Depends: apache2.2-common (= 2.2.14-5ubuntu8.10) but 2.2.20-1ubuntu1 is to be installed
  libapr1-dev: Depends: libapr1 (= 1.3.8-1ubuntu0.3) but 1.4.5-1 is to be installed
  libaprutil1-dev: Depends: libpcre3-dev but it is not going to be installed
E: Broken packages

I have ruby1.8.7,rubygem1.8.24, rails3.2.9 installed.

vim /etc/apt/sources.list

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://fr.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse

###### Ubuntu Update Repos
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

vim /etc/apt/sources.list.d

" ============================================================================
" Netrw Directory Listing                                        (netrw v136)
"   /etc/apt/sources.list.d
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
" ============================================================================
../
mercurial-ppa-releases-lucid.list
mercurial-ppa-releases-lucid.list.save
.mercurial-ppa-releases-lucid.list.swp
share|improve this question
    
What's wrong with the package libapache2-mod-passenger probably provided by your unspecified OS? And please tell the whole story. I suspect you have installed some unsupported backports or mixed up Ubuntu Lucid and Oneiric repositories. –  gertvdijk Dec 12 '12 at 9:48
    
How can I check, I am on ubuntu 10.04 LTS –  Subhransu Dec 12 '12 at 9:52
    
Share your repositories configured (/etc/apt/sources.list and files in /etc/apt/sources.list.d/). Ubuntu 10.04.x provides apache2.2-common version 2.2.14, but you have a source for and a dependency on 2.2.20 breaking other packages. This does not break by itself. Again: please share the whole story. –  gertvdijk Dec 12 '12 at 9:56
    
Please check the updated question –  Subhransu Dec 12 '12 at 10:04
add comment

3 Answers

have you tried aptitude instead of apt-get ?

i think you also need to install "build-essential" package, it's required to compile source code

share|improve this answer
    
Thanks, aptitude has solved the situation for me. –  N Bhargav Jun 21 at 9:56
add comment

passenger-install-apache2-module is for manual download and installation. Is there a specific reason or requirement to use passenger-install-apache2-module for the installation?

The "ubuntu" way (well, the reason of using a distro :D ) is to use following instead

sudo apt-get install libapache2-mod-passenger

That should pull in all dependencies and mostly pre-compiled package.

It will even enable the passenger mod for apache too

ls -l /etc/apache2/mods-enabled
lrwxrwxrwx 1 root root 32 Dec 12 09:50 passenger.conf -> ../mods-available/passenger.conf
lrwxrwxrwx 1 root root 32 Dec 12 09:50 passenger.load -> ../mods-available/passenger.load

A bit more info, if you are new to ubuntu, for apache related packages, they usually start with libapache2-, so if you do apt-get install libapache(press tab tab), will give you following

# apt-get install libapache 
Display all 108 possibilities? (y or n)
libapache2-authcassimple-perl     libapache2-mod-proxy-html
libapache2-authcookie-perl        libapache2-mod-python
libapache2-authenntlm-perl        libapache2-mod-python-doc
libapache2-mod-apparmor           libapache2-mod-qos
libapache2-mod-apreq2             libapache2-mod-random
libapache2-mod-auth-cas           libapache2-mod-removeip
libapache2-mod-auth-kerb          libapache2-mod-rivet
libapache2-mod-auth-mysql         libapache2-mod-rivet-doc
libapache2-mod-authn-sasl         libapache2-mod-rpaf
libapache2-mod-auth-ntlm-winbind  libapache2-mod-ruby
libapache2-mod-authn-webid        libapache2-mod-ruwsgi
libapache2-mod-authn-yubikey      libapache2-mod-ruwsgi-dbg
libapache2-mod-authnz-external    libapache2-mod-scgi
libapache2-mod-auth-openid        libapache2-modsecurity
libapache2-mod-auth-pam           libapache2-mod-shib2
libapache2-mod-auth-pgsql         libapache2-mod-spamhaus
libapache2-mod-auth-plain         libapache2-mod-speedycgi
libapache2-mod-auth-radius        libapache2-mod-suphp
libapache2-mod-auth-sys-group     libapache2-mod-upload-progress
libapache2-mod-authz-unixgroup    libapache2-mod-uwsgi
libapache2-mod-axis2c             libapache2-mod-uwsgi-dbg
libapache2-mod-bw                 libapache2-mod-vhost-hash-alias
libapache2-mod-defensible         libapache2-mod-vhost-ldap
libapache2-mod-dnssd              libapache2-mod-wsgi
libapache2-mod-encoding           libapache2-mod-wsgi-py3
libapache2-mod-evasive            libapache2-mod-xsendfile
libapache2-mod-fastcgi            libapache2-reload-perl
libapache2-mod-fcgid              libapache2-request-perl
libapache2-mod-fcgid-dbg          libapache2-svn
libapache2-mod-geoip              libapache2-webauth
libapache2-mod-gnutls             libapache2-webkdc
libapache2-mod-jk                 libapache-admin-config-perl
libapache2-mod-layout             libapache-asp-perl
libapache2-mod-ldap-userdir       libapache-authenhook-perl
libapache2-mod-ldap-userdir-dbg   libapache-authznetldap-perl
libapache2-mod-lisp               libapache-dbilogger-perl
libapache2-mod-log-sql            libapache-dbi-perl
libapache2-mod-log-sql-dbi        libapache-db-perl
libapache2-mod-log-sql-mysql      libapache-gallery-perl
libapache2-mod-log-sql-ssl        libapache-htgroup-perl
libapache2-mod-macro              libapache-htpasswd-perl
libapache2-mod-mime-xattr         libapache-mime4j-java
libapache2-mod-mono               libapache-mime4j-java-doc
libapache2-mod-musicindex         libapache-mod-auth-kerb
libapache2-mod-neko               libapache-mod-jk-doc
libapache2-mod-nss                libapache-mod-security
libapache2-mod-ocamlnet           libapache-poi-java
libapache2-mod-parser3            libapache-poi-java-doc
libapache2-mod-passenger          libapache-pom-java
libapache2-mod-perl2              libapache-ruby1.8
libapache2-mod-perl2-dev          libapache-session-perl
libapache2-mod-perl2-doc          libapache-session-wrapper-perl
libapache2-mod-php5               libapache-sessionx-perl
libapache2-mod-php5filter         libapache-singleton-perl
share|improve this answer
add comment

First, make sure to run apt-get update, to update the list of package versions that are available for installation. This isn't your sole problem here, but this error can be caused by not having run apt-get update recently enough.

You've installed some packages from backports. These are more recent versions of packages that get only installed on demand. With multi-package software such as Apache, you usually need to match all the packages that are part of the same software: either 2.2.14 or 2.2.20. Backport packages are only installed on explicit request: apache2.2-common is being pulled in from the regular distribution (2.2.14), but something on your system requires an Apache component from backports (2.2.20).

I don't think the errors from apt-get provide sufficient information to figure out what to do. In cases like this, I recommend running aptitude interactively and following one of its conflict resolution suggestions or manually selecting the package versions that you want to install.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.