我试图在Mac (Mountain Lion)上使用rbenv安装Ruby 2.0.0-p195,但得到了这个错误。
BUILD FAILED
Inspect or clean up the working tree at /var/folders/vt/27n8h2yj27v7rzq58075f3_m0000gn/T/ruby-build.20130618163859.1669
Results logged to /var/folders/vt/27n8h2yj27v7rzq58075f3_m0000gn/T/ruby-build.20130618163859.1669.log
Last 10 log lines:
installing default gems: /Users/me/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0 (build_info, cache, doc, gems, specifications)
bigdecimal 1.2.0
io-console 0.4.2
json 1.7.7
minitest 4.3.2
psych 2.0.0
rake 0.9.6
rdoc 4.0.0
test-unit 2.0.0.0
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?
当我运行brew install openssl时,它显示
Warning: openssl-1.0.1e already installed
按照这个线程https://github.com/sstephenson/ruby-build/issues/305的解决方案,我尝试以这种方式安装最新稳定版,得到了同样的错误
env CFLAGS='-g -O2' RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p195
有什么想法吗?
发布于 2014-07-22 08:15:07
我通过执行以下命令修复了这个问题:
brew link openssl --force
Mac OSX 10.9.4
发布于 2013-07-04 16:04:59
升级到最新版本的ruby-build为我解决了这个问题:
就像行动一样,我得到了
BUILD FAILED
Inspect or clean up the working tree at /Users/me/.rbenv/sources/2.0.0-p247
Results logged to /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20130704172404.3106.log
Last 10 log lines:
installing default gems: /Users/me/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0 (build_info, cache, doc, gems, specifications)
bigdecimal 1.2.0
io-console 0.4.2
json 1.7.7
minitest 4.3.2
psych 2.0.0
rake 0.9.6
rdoc 4.0.0
test-unit 2.0.0.0
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?
但是要安装最新版本的ruby-build,请通过
# Don't forget brew doctor and brew update if required
brew upgrade ruby-build
修好了。
ruby-build在OP请求时和现在之间有了一些变化,这可以解释为什么它适用于我,但不适用于使用最新稳定版本的Ruby-build的OP。
发布于 2014-10-06 21:32:11
使用ruby-install的解决方案:
在卸载和安装openssl几次(可能没有必要)之后,我成功地尝试了以下操作:
ruby-install ruby 2.1.3 -- --with-openssl-dir=`brew --prefix openssl`
https://stackoverflow.com/questions/17181075
复制相似问题