尝试使用rbenv(或其他我尝试过RVM和ruby-install的安装程序)安装Ruby失败,并显示此错误
$ rbenv install 2.6.3
> Downloading ruby-2.6.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.bz2
Installing ruby-2.6.3...
ruby-build: use readline from homebrew
BUILD FAILED (Deepin 15.10 using ruby-build 20190423)
Inspect or clean up the working tree at /tmp/ruby-build.20190507002901.29361
Results logged to /tmp/ruby-build.20190507002901.29361.log
Last 10 log lines:
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/package.rb:44:in `<top (required)>'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/installer.rb:11:in `<top (required)>'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from ./tool/rbinstall.rb:703:in `<module:RbInstall>'
from ./tool/rbinstall.rb:639:in `<main>'
uncommon.mk:364: recipe for target 'do-install-all' failed
make: *** [do-install-all] Error 1
答案 0 :(得分:0)
尝试一下:
$ TMPDIR=~/tmp/ rbenv install 2.6.3
答案 1 :(得分:0)
终于解决了!
我不得不使用brew unlink openssl
然后sudo apt-get install -y libssl-dev zlib1g-dev
然后我尝试了rbenv install 2.6.3
并成功了!