使用RVM红宝石2.X安装故障(Troubles with ruby-2.X installatio

2019-07-21 01:41发布

我最近遇到的红宝石2.0.0-P0安装的来了。 在成功安装RVM后我在bash中键入以下命令。

rvm install ruby-2.0.0-p0

这此结果的日志。

Searching for binary rubies, this might take some time.
No binary rubies available for: debian/wheezy_sid/i386/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /home/javier/.rvm/rubies/ruby-2.0.0-p0, this may take a while depending on your cpu(s)...
ruby-2.0.0-p0 - #downloading ruby-2.0.0-p0, this may take a while depending on your connection...
ruby-2.0.0-p0 - #extracting ruby-2.0.0-p0 to /home/javier/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #extracted to /home/javier/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #configuring
ruby-2.0.0-p0 - #compiling
ruby-2.0.0-p0 - #installing
Removing old Rubygems files...
Installing rubygems-2.0.0 for ruby-2.0.0-p0 ...
Error running 'env GEM_PATH=/home/javier/.rvm/gems/ruby-2.0.0-p0:/home/javier/.rvm/gems/ruby-2.0.0-p0@global:/home/javier/.rvm/gems/ruby-2.0.0-p0:/home/javier/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/home/javier/.rvm/gems/ruby-2.0.0-p0 /home/javier/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /home/javier/.rvm/src/rubygems-2.0.0/setup.rb', please read /home/javier/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
Installation of rubygems did not complete successfully.
Saving wrappers to '/home/javier/.rvm/bin'.
ruby-2.0.0-p0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p0 - #importing default gemsets, this may take time ...
Install of ruby-2.0.0-p0 - #complete
Making gemset ruby-2.0.0-p0 pristine.
Error running '' under ,
please read /home/javier/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log
Making gemset ruby-2.0.0-p0@global pristine.
Error running '' under ,
please read /home/javier/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log

需要注意的是过程不用烦恼,直到安装红宝石宝石。 这里发生了什么 ??

任何帮助表示赞赏。

华富首评输出

cat /home/javier/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
/home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- openssl (LoadError)
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/security.rb:8:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/package.rb:43:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/installer.rb:8:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/request_set.rb:5:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems.rb:195:in `finish_resolve'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/rdoc.rb:14:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/uninstaller.rb:10:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:440:in `uninstall_old_gemcutter'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:144:in `execute'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command.rb:305:in `invoke_with_build_args'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:170:in `process_args'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:130:in `run'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/gem_runner.rb:60:in `run'
from setup.rb:45:in `<main>'
RubyGems 2.0.0 installed

第二评论输出和其他命令

rvm use --default 2.0.0
RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.

Answer 1:

请尝试以下

$ rvm remove 2.0.0 # get rid of unsuccessful installation
$ rvm get head --autolibs=3 # get the latest RVM and build required libs
$ rvm requirements # just in case, install all other required stuff
$ rvm install ruby-2.0.0

如果在任何这些命令中的任何一点失败。 更新日志你的问题。



Answer 2:

我有这个确切的同样的问题。 该解决方案是优雅而简洁。

只要更新你的宝石在命令行直接

sudo gem update --system

而已! 终端现在将显示:

Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-2.0.3
Updating RubyGems to 2.0.3
Installing RubyGems 2.0.3
RubyGems 2.0.3 installed


Answer 3:

我有这个确切的同样的问题,同样的错误消息,等我不知道你怎么想,但我用的MacPorts,并通过我的库,例如安装OpenSSL的,我觉得可能我的麻烦都作出了贡献。

我刚刚得到它在我的系统上工作; 我不知道到底是什么我做了正确的,但这里是我采取的步骤:

  1. 设置我的~/.rvmrc相匹配的第一个代码块在这里 。
  2. 通过RVM卸载2.0.0( rvm remove 2.0.0 )。
  3. 删除了文件夹红宝石2.0.0,RubyGems的-2.0.0和依赖包,比如OpenSSL和YAML ~/.rvm/src
  4. 执行rvm install 2.0.0 --with-opt-dir=/opt/local --autolibs=0/opt/local是我的MacPorts前缀目录, autolibs=0禁止任何依赖安装,以便它没有使用其他的东西比我的MacPorts库的机会。 如果通过这一步不红控制台输出让你过去,你上面是有错误。
  5. 不知道如果有一个空的默认宝石是问题我也跑rvm use --create 2.0.0@...让创建非默认的宝石,然后(成功)安装了宝石和它的依赖进去。

我希望这有帮助!



Answer 4:

打通终端,然后去编辑>首选项档案 ,然后去标签“ 标题和命令 ”,并选中“ 运行命令登录shell”。

开机一击,现在你可以直接从终端无需使用sudo的和错误的安装宝石“RVM不是一个函数,选择具有红宝石‘RVM使用...’是行不通的。”将被淘汰。

干杯。



文章来源: Troubles with ruby-2.X installation using RVM
标签: ruby rvm