您的位置:首页 > 运维架构

cannot load such file -- openssl

2014-11-18 23:37 1346 查看
[test@localhost usr]$ /usr/local/ruby/bin/gem install bundler
ERROR:  Loading command: install (LoadError)
cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass


在用源码安装ruby之后,想要安装bundler,却报出上面错误

\curl -sSL https://get.rvm.io | bash


rvm pkg install openssl


重新编译

./configure --prefix=/opt/ruby20 --with-openssl-dir=/home/test/.rvm/usr


最后可能会提示如下的错误,不用管他

configure: WARNING: unrecognized options: --with-openssl-dir

make
make install


没有问题了

[root@localhost ruby-2.0.0-p598]# /opt/ruby20/bin/gem install bundler -V
GET https://rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz


如果报出这个警告:

'rvm pkg ...' is deprecated

则采用

rvm autolibs
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: