简体   繁体   English

使用橡胶进行部署:未找到“libapache2-mod-passenger”

[英]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 . 我正在关注Ryan Bates的Rails Cast, 将Rails应用程序部署到带有Rubber的EC2 Everything seems to go well until this error. 在这个错误之前,一切似乎都很顺利。 How can I fix this? 我怎样才能解决这个问题?

** [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-passenger ,没有帮助。

I am using Ruby 1.9.3 to avoid other problems 我使用Ruby 1.9.3来避免其他问题

结束了在rubber-passenger.yml中将乘客版本从1:4.0.48-1~precise11:4.0.50-1~precise1并解决了问题。

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 你需要做的就是改变号码版本并获得数字版本,如Derek Hill所说

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表达了这个问题的原因:“ 一旦新版本发布,Passenger就会有这种令人烦恼的行为,即从索引中删除软件包。

The answer is to update the passenger_version in rubber-passenger.yml , but the question is to what. 答案是更新passenger_versionrubber-passenger.yml ,但问题是什么。

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 转到https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages
  2. Open the “Packages” file 打开“包”文件
  3. Find the version of the libapache2-mod-passenger package 找到libapache2-mod-passenger软件包的版本

In my case that meant updating passenger_version to 1:5.0.5-1~trusty1 在我的情况下,这意味着将passenger_version更新为1:5.0.5-1~trusty1

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'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 橡胶:libapache2-mod-passenger的未满足依赖项 - Rubber : Unmet Dependencies for libapache2-mod-passenger 无法为 Apache 2.4 安装 libapache2-mod-passenger? - Can't install libapache2-mod-passenger for Apache 2.4? Rails使用Rubber部署到ec2:mod_passenger.so:无法打开共享对象文件 - Rails deploy to ec2 with Rubber: mod_passenger.so: cannot open shared object file Capistrano橡胶Phusion客运企业配置 - Capistrano Rubber Phusion Passenger Enterprise Config 使用橡胶部署时启用hstore - Enabling hstore when deploying with rubber 在使用Apache2和Passenger部署Rails应用程序时发现404错误 - 404 Not found error in deploying a Rails app with Apache2 and Passenger 使用bundler和phusion passenger部署rails3应用程序:.bundle目录未找到 - deploying rails3 apps with bundler and phusion passenger: .bundle dir not found 使用乘客和Apache部署Rails时出错:mod_passenger中出现意外错误:无法连接到Unix套接字权限被拒绝(errno = 13) - Error when deploying Rails with Passenger and Apache: Unexpected error in mod_passenger: Cannot connect to Unix socket Permission denied (errno=13) 在Windows上使用Rubber部署到EC2 - Deploying to EC2 using Rubber on Windows 与旅客一起部署Rails应用程序 - Deploying Rails App with Passenger
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM