marimaf marimaf - 1 year ago 39
Ruby Question

Deploying with Rubber: 'libapache2-mod-passenger' was not found

I am following Ryan Bates's Rails Cast to deploy a Rails app to EC2 with Rubber. Everything seems to go well until this error. How can I fix this?

** [out ::] Ign precise/main Translation-en
** [out ::] Fetched 60.6 kB in 2s (25.7 kB/s)
** [out ::] Reading package lists...
** [out ::]
** [out ::] Reading package lists...
** [out ::]
** [out ::] Building dependency tree...
** [out ::]
** [out ::] Reading state information...
** [out ::]
** [out ::] E
** [out ::] :
** [out ::] Version '1:4.0.48-1~precise1' for 'libapache2-mod-passenger' was not found
** [out ::]
command finished in 10387ms
failed: "/bin/bash -l -c 'sudo -p '\\''sudo password: '\\'' bash -l /tmp/install_packages postfix build-essential git-core libxslt-dev ntp postgresql-client libpq-dev subversion curl autoconf bison ruby zlib1g-dev libssl-dev libreadline6-dev libxml2-dev libyaml-dev apache2 libapache2-mod-proxy-html libcurl4-openssl-dev libapache2-mod-xsendfile apache2-mpm-prefork apache2-prefork-dev libapache2-mod-passenger=1:4.0.48-1~`lsb_release -sc`1 collectd libperl-dev monit postgresql-9.1 openjdk-7-jdk unzip python-django python-django-tagging python-cairo python-memcache memcached uwsgi uwsgi-plugin-python uwsgi-plugin-http sqlite3 bzr zip mongodb-10gen haproxy ec2-ami-tools'" on


app_name: My_App

app_user: app

admin_email: "root@#{full_host}"

timezone: US/Western



region: us-west-2

secret_access_key: secret-keyXX

key_name: my-key-file
key_file: "#{Dir[(File.expand_path('~') rescue '/root') + '/.ec2/*' +].first}"

image_type: t2.micro
image_id: ami-ef5e24df #this is a Ubuntu 12.04 precise EBS hvm 64-bit

Tried what was suggested in this question, but didn't help.
I tried installing
in both my local machine and amazon's instance, didn't help.

I am using Ruby 1.9.3 to avoid other problems

Answer Source

Ended up changing the passenger version from 1:4.0.48-1~precise1 to 1:4.0.50-1~precise1 in the rubber-passenger.yml and that fixed the problem.