2014-12-11 203 views
1
當我執行「RVM安裝2.1.5」

,它給我的錯誤RVM「RVM安裝Ruby」無法安裝紅寶石,安裝在/ usr /本地

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

幫我解決這個問題,謝謝

在這裏,我增加了一些更多的錯誤,同時安裝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. 

後向上漸變到Mac OS X約塞米蒂它給人的錯誤,在小牛隊的正常工作

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 <[email protected]>, Michal Papis <[email protected]> [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/[email protected]/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/[email protected]" 
    MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-2.1.3" 
    IRBRC:  "/usr/local/rvm/rubies/ruby-2.1.3/.irbrc" 
    RUBYOPT:  "" 
    gemset:  "" 
+0

什麼操作系統,平臺等?發佈「朗姆酒信息」的輸出。 – Beartech 2014-12-11 05:21:57

+0

MacOS X-Yosimite, – Zero 2014-12-11 05:44:52

+0

@prakashS我剛剛看到您的上述評論。對不起,我從來沒有在MacOS上工作,所以我已經刪除了我的答案,因爲它是根據Linux系統。 – shivam 2014-12-11 05:48:32

回答

2

你的問題是權限:

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

您已經安裝在/usr/local

RVM我在OS X上的優勝美地運行RVM和有我的RVM安裝在我的家目錄中:

/Users/andy... 

如果要像安裝時那樣全局安裝,則可能必須使用sudo命令完成安裝。但我強烈建議不要這樣做。

您應該卸載RVM並將其重新安裝到您的主目錄下。也就是說,打開終端並確保您位於您的主目錄中:

cd ~/ 

會將您置於您的主目錄中。然後安裝RVM,不要使用sudo,只需使用常規權限進行安裝即可。這是RVM的重點,以保持Ruby的版本不同。

這裏是重新安裝之前,從系統中刪除舊的RVM的所有痕跡堆棧溢出的答案: How can I remove RVM (Ruby Version Manager) from my system? 務必在年底要注意部分有關檢查修改您的$ PATH變量。