2014-08-29 93 views
3

我正在關注Ryan Bates的Rails Cast to deploy a Rails app to EC2 with Rubber。一切似乎順利,直到這個錯誤。我怎樣才能解決這個問題?部署橡膠:未找到'libapache2-mod-passenger'

** [out :: production.foo.com] Ign https://oss-binaries.phusionpassenger.com precise/main Translation-en 
** [out :: production.foo.com] Fetched 60.6 kB in 2s (25.7 kB/s) 
** [out :: production.foo.com] Reading package lists... 
** [out :: production.foo.com] 
** [out :: production.foo.com] Reading package lists... 
** [out :: production.foo.com] 
** [out :: production.foo.com] Building dependency tree... 
** [out :: production.foo.com] 
** [out :: production.foo.com] Reading state information... 
** [out :: production.foo.com] 
** [out :: production.foo.com] E 
** [out :: production.foo.com] : 
** [out :: production.foo.com] Version '1:4.0.48-1~precise1' for 'libapache2-mod-passenger' was not found 
** [out :: production.foo.com] 
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 production.foo.com 

rubber.yml

app_name: My_App 

app_user: app 

admin_email: "[email protected]#{full_host}" 

timezone: US/Western 

domain: foo.com 

cloud_providers: 
    aws: 

region: us-west-2 

access_key: MYACCESSKEYXX 
secret_access_key: secret-keyXX 
account: MYACCOUNTXXX 

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

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

試了一下建議在this question,但並沒有幫助。 我試圖在我的本地機器和亞馬遜的實例中安裝libapache2-mod-passenger,沒有幫助。

我使用Ruby 1.9.3,以避免其他問題

回答

2

結束了在該rubber-passenger.yml改變從1:4.0.48-1~precise1乘客版本1:4.0.50-1~precise1,並且解決了這一問題。

0

我遇到了同樣的錯誤。

其原因問題是由Kevin Menard表示:「Passenger has this very annoying behavior of removing packages from their index as soon as a new version is released.

答案是更新rubber-passenger.ymlpassenger_version,但問題是什麼。

爲我工作的方法是obtaining the version from the trusty directory

  1. 轉到https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages
  2. 打開「包」的文件
  3. 找到libapache2-mod-passenger

的版本在我的情況這意味着更新passenger_version1:5.0.5-1~trusty1

+0

該鏈接爲我打破。這是一個工程:https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages。 在我的情況下有兩個條目:5.0.7和5.0.8,只有5.0.8爲我工作(5.0.7抱怨依賴關係) – Kage 2015-05-29 02:58:25

+0

感謝@Kage。我已更新該鏈接。 – 2015-05-29 14:49:43

1

只是它的更新。

必須以這種方式改變:

passenger_version: '1:4.0.57-1~`lsb_release -sc`1' 

之前之後

passenger_version: '1:5.0.6-1~`lsb_release -sc`1' 

,你所要做的僅僅是改變數字版本,並獲得數版本德里克·希爾說

0

我面臨同樣的問題。一個接一個我試過的版本出現上面給出的網址

https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages

我發現它忙碌第一,我想我怎麼能進入所有一個接一個。因此,我使用chrome ctrl + f搜索過濾器過濾了包含關鍵字「libapache2-mod-passenger」的關鍵字,因爲它突出顯示了此關鍵字所在的區域。

幸運,我得到這個工作的這個版本

'1:5.0.29-1~`lsb_release -sc`1' 
相關問題