简体   繁体   中英

AWS bundle install error: Make sure that `gem install memcached -v '1.8.0'` succeeds before bundling

I'm unable to deploy my rails app to elastic beanstalk due to a bundle install error. Here's the full log:

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)

I recently updated to ruby 2.1.5 though rvm (I was running ruby 2.0.0 before), which may be causing my problems?

It's on an aws ec2 t1.micro instance running linux

Assuming this is Amazon's linux distribution (a yum based distro), you can look at the error message and derive a solution.

Please install SASL to continue. The package is called libsasl2-dev on Ubuntu

For Ubuntu you would use

sudo apt-get install libsasl2-dev

For your OS, you will need to use yum . Not sure the exact package name but you can try

sudo yum search libsasl

and find some variant of libsasl2-dev . Afterwards just run

sudo yum install <package name>

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM