【问题标题】:Deploying with Rubber: 'libapache2-mod-passenger' was not found使用 Rubber 部署:找不到“libapache2-mod-passenger”
【发布时间】:2014-10-22 23:31:44
【问题描述】:

我正在关注 Ryan Bates 的 Rails Cast 到 deploy a Rails app to EC2 with Rubber。在出现此错误之前,一切似乎都很顺利。我该如何解决这个问题?

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

尝试了this question 中的建议,但没有帮助。 我尝试在本地机器和亚马逊实例中安装libapache2-mod-passenger,但没有帮助。

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

【问题讨论】:

    标签: ruby-on-rails ruby amazon-web-services amazon-ec2 rubber


    【解决方案1】:

    最终将 rubber-passenger.yml 中的乘客版本从 1:4.0.48-1~precise1 更改为 1:4.0.50-1~precise1 并解决了问题。

    【讨论】:

      【解决方案2】:

      只是一个更新。

      你必须这样改变:

      之前

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

      之后

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

      你要做的只是改变数字版本,并按照 Derek Hill 所说的那样获得数字版本

      【讨论】:

        【解决方案3】:

        我遇到了同样的错误。

        这个问题的原因用Kevin Menard表示:“Passenger has this very annoying behavior of removing packages from their index as soon as a new version is released.

        答案是更新passenger_version中的rubber-passenger.yml,但问题是什么。

        对我有用的方法是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_version 更新为1:5.0.5-1~trusty1

        【讨论】:

        【解决方案4】:

        我遇到了同样的问题。我一一尝试了上面给定网址上的版本

        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'
        

        【讨论】:

          猜你喜欢
          • 2011-01-06
          • 1970-01-01
          • 2016-06-25
          • 2017-03-08
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-02-03
          相关资源
          最近更新 更多