【问题标题】:AWS bundle install error: Make sure that `gem install memcached -v '1.8.0'` succeeds before bundlingAWS 捆绑安装错误:在捆绑之前确保 `gem install memcached -v '1.8.0'` 成功
【发布时间】:2015-05-19 03:34:05
【问题描述】:

由于捆绑安装错误,我无法将我的 rails 应用程序部署到弹性 beanstalk。这是完整的日志:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

      /opt/rubies/ruby-2.1.5/bin/ruby extconf.rb 
  checking for sasl/sasl.h... no
  Please install SASL to continue. The package is called libsasl2-dev on Ubuntu and cyrus-sasl on Gentoo.
  *** extconf.rb failed ***
  Could not create Makefile due to some reason, probably lack of necessary
  libraries and/or headers.  Check the mkmf.log file for more details.  You may
  need configuration options.

  Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/opt/rubies/ruby-2.1.5/bin/ruby

  extconf failed, exit code 1

  Gem files will remain installed in /opt/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/memcached-1.8.0 for inspection.
  Results logged to /opt/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/memcached-1.8.0/gem_make.out
  An error occurred while installing memcached (1.8.0), and Bundler cannot
  continue.
  Make sure that `gem install memcached -v '1.8.0'` succeeds before bundling. (Executor::NonZeroExitStatus)

我最近通过 rvm 更新到 ruby​​ 2.1.5(我之前运行的是 ruby​​ 2.0.0),这可能导致我的问题?

【问题讨论】:

  • 你在什么操作系统上运行?
  • 它在运行 linux 的 aws ec2 t1.micro 实例上,而不是在我的本地计算机上。对不起,如果我没有提到这一点。

标签: ruby-on-rails ruby amazon-web-services bundler


【解决方案1】:

它在运行 linux 的 aws ec2 t1.micro 实例上

假设这是 Amazon 的 linux 发行版(基于 yum 的发行版),您可以查看错误消息并得出解决方案。

请安装 SASL 以继续。该软件包在 Ubuntu 上称为 libsasl2-dev

对于 Ubuntu,你会使用

sudo apt-get install libsasl2-dev

对于您的操作系统,您需要使用yum。不确定确切的包名称,但您可以尝试

sudo yum search libsasl

并找到libsasl2-dev 的一些变体。然后运行

sudo yum install <package name>

【讨论】:

【解决方案2】:

由于您使用的是 EB,您是否尝试过将 libsasl2-dev 添加到 Elastic Beanstalk 配置文件中的包中?

【讨论】:

    猜你喜欢
    • 2017-08-27
    • 1970-01-01
    • 1970-01-01
    • 2015-07-21
    • 1970-01-01
    • 2021-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多