没有找到“libapache2-mod-乘客”。

时间:2020-12-25 16:54:16

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?

我正在跟踪Ryan Bates的Rails Cast,使用Rubber将Rails应用部署到EC2上。一切似乎都很顺利,直到这个错误。我该怎么解决这个问题呢?

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

My rubber.yml:

我的rubber.yml:

app_name: My_App

app_user: app

admin_email: "root@#{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 

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

尝试了问题中提出的建议,但没有帮助。我试着在本地机器和亚马逊的实例中安装libapache2-mod乘客,但都无济于事。

I am using Ruby 1.9.3 to avoid other problems

我使用Ruby 1.9.3来避免其他问题

4 个解决方案

#1


2  

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.

最后将乘客的版本从1:4.0.48-1~精确到1:4.0.50-1~精确到橡胶乘客。这个问题解决了。

#2


1  

Just an update of it.

只是更新一下。

You must change in this way:

你必须这样改变:

before

之前

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

after

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

What you have to do is just change the number version and get the number version as Derek Hill said

你要做的就是改变数字版本,得到数字版本,就像德里克·希尔说的那样

#3


0  

I experienced this same error.

我也经历了同样的错误。

The reason for this problem is expressed by Kevin Menard: “Passenger has this very annoying behavior of removing packages from their index as soon as a new version is released.

这个问题的原因由Kevin Menard表示:“当一个新版本发布时,乘客就会有一种非常恼人的行为,从他们的索引中删除包。”

The answer is to update the passenger_version in rubber-passenger.yml, but the question is to what.

答案是在“橡皮乘客”中更新“乘客”版本。但是问题是。

The approach that worked for me was obtaining the version from the trusty directory:

对我有效的方法是从可靠的目录中获得版本:

  1. Go to https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages
  2. 去https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages
  3. Open the “Packages” file
  4. 打开“包”文件
  5. Find the version of the libapache2-mod-passenger package
  6. 找到libapache2-mod-passenger包的版本

In my case that meant updating passenger_version to 1:5.0.5-1~trusty1

在我的例子中,这意味着要将passenger_version更新为1:5.5 .5-1~trusty1

#4


0  

I faced the same issue. One by one I tried the version present on above given url

我面临着同样的问题。我一个接一个地尝试了上面给出的url。

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

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

I found it hectic first and I thought how could I enter all one by one. So I filtered the ones containing keywords "libapache2-mod-passenger" by using chrome ctrl+f search filter, as it highlights the area where this keyword is present.

我第一次发现它很紧张,我想我怎么能一个一个地进入。因此,我使用chrome ctrl+f搜索过滤器过滤了包含“libapache2-mod-passenger”关键词的关键词,因为它突出了这个关键词出现的区域。

Fortunately I got this working on this version

幸运的是,我得到了这个版本

'1:5.0.29-1~`lsb_release -sc`1'

#1


2  

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.

最后将乘客的版本从1:4.0.48-1~精确到1:4.0.50-1~精确到橡胶乘客。这个问题解决了。

#2


1  

Just an update of it.

只是更新一下。

You must change in this way:

你必须这样改变:

before

之前

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

after

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

What you have to do is just change the number version and get the number version as Derek Hill said

你要做的就是改变数字版本,得到数字版本,就像德里克·希尔说的那样

#3


0  

I experienced this same error.

我也经历了同样的错误。

The reason for this problem is expressed by Kevin Menard: “Passenger has this very annoying behavior of removing packages from their index as soon as a new version is released.

这个问题的原因由Kevin Menard表示:“当一个新版本发布时,乘客就会有一种非常恼人的行为,从他们的索引中删除包。”

The answer is to update the passenger_version in rubber-passenger.yml, but the question is to what.

答案是在“橡皮乘客”中更新“乘客”版本。但是问题是。

The approach that worked for me was obtaining the version from the trusty directory:

对我有效的方法是从可靠的目录中获得版本:

  1. Go to https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages
  2. 去https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages
  3. Open the “Packages” file
  4. 打开“包”文件
  5. Find the version of the libapache2-mod-passenger package
  6. 找到libapache2-mod-passenger包的版本

In my case that meant updating passenger_version to 1:5.0.5-1~trusty1

在我的例子中,这意味着要将passenger_version更新为1:5.5 .5-1~trusty1

#4


0  

I faced the same issue. One by one I tried the version present on above given url

我面临着同样的问题。我一个接一个地尝试了上面给出的url。

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

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

I found it hectic first and I thought how could I enter all one by one. So I filtered the ones containing keywords "libapache2-mod-passenger" by using chrome ctrl+f search filter, as it highlights the area where this keyword is present.

我第一次发现它很紧张,我想我怎么能一个一个地进入。因此,我使用chrome ctrl+f搜索过滤器过滤了包含“libapache2-mod-passenger”关键词的关键词,因为它突出了这个关键词出现的区域。

Fortunately I got this working on this version

幸运的是,我得到了这个版本

'1:5.0.29-1~`lsb_release -sc`1'