由于捆绑安装错误,我无法将我的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)
我最近更新了ruby 2.1.5虽然rvm(我之前运行的是ruby 2.0.0),这可能会导致我的问题?
答案 0 :(得分:1)
它在运行linux的aws ec2 t1.micro实例
上
假设这是亚马逊的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>
答案 1 :(得分:0)
由于您使用EB,您是否尝试将libsasl2-dev添加到Elastic Beanstalk配置文件中的包中?