2012-09-22 92 views
1

剛拿到我的第一個mac,我正在嘗試設置一個ruby dev環境。我更新了XCode和Homebrew和RVM。我試圖讓RVM安裝Ruby 1.9.2,但它失敗了。在Macbook Air上通過rvm安裝ruby時出錯

任何想法?

Fetching yaml-0.1.4.tar.gz to /Users/mlanza/.rvm/archives 
Extracting yaml-0.1.4.tar.gz to /Users/mlanza/.rvm/src 
Error running 'tar xmzf /Users/mlanza/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/mlanza/.rvm/src ', please read /Users/mlanza/.rvm/log/ruby-1.9.2-p320/yaml/extract.log 
Configuring yaml in /Users/mlanza/.rvm/src/yaml-0.1.4. 
Error running ' ./configure --prefix="/Users/mlanza/.rvm/usr" ', please read /Users/mlanza/.rvm/log/ruby-1.9.2-p320/yaml/configure.log 
Compiling yaml in /Users/mlanza/.rvm/src/yaml-0.1.4. 
Error running 'make ', please read /Users/mlanza/.rvm/log/ruby-1.9.2-p320/yaml/make.log 
Installing Ruby from source to: /Users/mlanza/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)... 

ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may take a while depending on your connection... 
ruby-1.9.2-p320 - #extracted to /Users/mlanza/.rvm/src/ruby-1.9.2-p320 (already extracted) 
ruby-1.9.2-p320 - #configuring 
Error running ' ./configure --prefix=/Users/mlanza/.rvm/rubies/ruby-1.9.2-p320 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/mlanza/.rvm/usr ', please read /Users/mlanza/.rvm/log/ruby-1.9.2-p320/configure.log 
There has been an error while running configure. Halting the installation. 

我對Ubuntu很熟悉,在那裏沒有問題。我期待Mac電腦更容易一些。

+2

也許更適合超級用戶? – chris

回答

0

升級到Mountain Lion後,我遇到了同樣的問題。如果我沒有記錯,那是因爲最新版本的Xcode不再與命令行工具捆綁在一起。

您仍然可以通過訪問https://developer.apple.com/downloads/並搜索Xcode 4.5(OS X Mountain Lion)的命令行工具來免費下載它們。你需要一個免費的開發者賬戶來訪問下載區域。

+0

謝謝,夥計們。我能夠解決這個問題。 :) – Mario

0

您需要閱讀rvm requirements - 它會告訴你如何安裝這是需要在OSX上成功安裝Ruby gcc-4.2,你可以用clang(附帶最新的Xcode)嘗試,但它可以特別爲您帶來的隨機問題與纖維。

相關問題