cannot load such file -- openssl


[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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM