简体   繁体   English

“ RVM安装红宝石”无法安装红宝石,RVM安装在/ usr / local中

[英]“RVM install ruby” failed to install rubies, RVM installed in /usr/local

when i executing 'RVM install 2.1.5', it gives me errors 当我执行“ RVM安装2.1.5”时,它给了我错误

Error running '__rvm_package_extract /usr/local/rvm/archives/ruby-2.1.5.tar.bz2 /usr/local/rvm/tmp/rvm_src_7085'    

help me to fix this issues,thanks 谢谢我帮我解决这个问题

here i added some more errors while installing ruby 在这里我在安装​​ruby时添加了更多错误

mkdir: /usr/local/rvm/tmp/rvm_src_7085: Permission denied
ruby-2.1.5 - #extracting ruby-2.1.5 to /usr/local/rvm/src/ruby-2.1.5....
Error running '__rvm_package_extract /usr/local/rvm/archives/ruby-2.1.5.tar.bz2 /usr/local/rvm/tmp/rvm_src_7085',
showing last 15 lines of /usr/local/rvm/log/1418271602_ruby-2.1.5/extract.log
++ [[ -d '' ]]
++ mkdir -p ''
mkdir: : No such file or directory
++ case "$1" in
++ [[ -n '' ]]
++ __rvm_tar xjf /usr/local/rvm/archives/ruby-2.1.5.tar.bz2 -C ''
++ tar xjf /usr/local/rvm/archives/ruby-2.1.5.tar.bz2 -C ''
tar: could not chdir to ''

++ return 1
++ return 1
++ __return=1
++ ((  __return == 0  ))
++ [[ -n '' ]]
++ return 1
There has been an error while trying to extract the source. Halting the installation.
There has been an error fetching the ruby interpreter. Halting the installation.

After up-gradation to MAC OS X Yosemite it gives the error ,in mavericks it works fine 升级到MAC OS X Yosemite后,它给出了错误,在特立独行的情况下,它可以正常工作

rvm info gives the following rvm信息给出以下内容

ruby-2.1.3:

  system:
    uname:       "Darwin D007.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64"
    system:      "osx/10.10/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin14)"
    zsh:         "/bin/zsh => zsh 5.0.5 (x86_64-apple-darwin14.0)"

  rvm:
    version:      "rvm 1.26.4 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "31 minutes 59 seconds ago"
    path:         "/usr/local/rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.1.3p242"
    date:         "2014-09-19"
    platform:     "x86_64-darwin13.0"
    patchlevel:   "2014-09-19 revision 47630"
    full_version: "ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]"

  homes:
    gem:          "/usr/local/rvm/gems/ruby-2.1.3"
    ruby:         "/usr/local/rvm/rubies/ruby-2.1.3"

  binaries:
    ruby:         "/usr/local/rvm/rubies/ruby-2.1.3/bin/ruby"
    irb:          "/usr/local/rvm/rubies/ruby-2.1.3/bin/irb"
    gem:          "/usr/local/rvm/rubies/ruby-2.1.3/bin/gem"
    rake:         "/usr/local/rvm/gems/ruby-2.1.3/bin/rake"

  environment:
    PATH:         "/usr/local/rvm/gems/ruby-2.1.3/bin:/usr/local/rvm/gems/ruby-2.1.3@global/bin:/usr/local/rvm/rubies/ruby-2.1.3/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/rvm/bin:/Users/prakash/.rvm/bin"
    GEM_HOME:     "/usr/local/rvm/gems/ruby-2.1.3"
    GEM_PATH:     "/usr/local/rvm/gems/ruby-2.1.3:/usr/local/rvm/gems/ruby-2.1.3@global"
    MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-2.1.3"
    IRBRC:        "/usr/local/rvm/rubies/ruby-2.1.3/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

Your problem is in permissions: 您的问题出在权限:

 mkdir: /usr/local/rvm/tmp/rvm_src_7085: Permission denied

You have RVM installed in /usr/local 您在/usr/local安装了RVM

I am running RVM on OS X Yosemite and have my RVM installed in my home directory: 我在OS X Yosemite上运行RVM并将RVM安装在主目录中:

 /Users/andy...

If you want to install globally like you have it, you will probably have to use the sudo command to complete the install. 如果要像您一样全局安装,则可能必须使用sudo命令来完成安装。 But I would highly recommend NOT doing that. 但我强烈建议您不要这样做。

You should uninstall RVM and re-install it under your home directory. 您应该卸载RVM并将其重新安装在主目录下。 That is, open the terminal and ensure that you are in your home directory: 也就是说,打开终端并确保您位于主目录中:

cd ~/

will put you in your home directory. 将把您放在主目录中。 Then install RVM and DO NOT use sudo, just install it with your regular permissions. 然后安装RVM,并且不要使用sudo,只需使用您的常规权限安装它即可。 That is the whole point of RVM, to keep the versions of Ruby separate. 这是RVM的要点,以保持Ruby的版本分开。

Here is the Stack Overflow answer for removing all traces of the old RVM from your system before reinstalling: How can I remove RVM (Ruby Version Manager) from my system? 这是Stack Overflow的答案,用于在重新安装之前从系统中删除所有旧RVM的痕迹: 如何从系统中删除RVM(Ruby版本管理器)? Be sure and pay attention to the part at the end about checking for modifications to your $PATH variable. 确保并注意最后有关检查$ PATH变量的修改的部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM