[英]Trouble installing Ruby 2.0.0-p247 via RVM (OSX Mountain Lion)
我的最終目標是安裝當前版本的Ruby on Rails。 我在OS X Mountain Lion上運行。 到目前為止,這是我的流程:
已安裝的RVM
$ \curl -L https://get.rvm.io | bash -s stable
檢查已知(並且我認為已批准)安裝
$ rvm list known
我看到目前穩定的版本可用
[ruby-]2.0.0[-p247]
鍵入安裝命令
$ rvm install 2.0.0-p247
注意:我也嘗試過這些安裝命令
$ rvm install ruby-2.0.0-p247
$ rvm install ruby=2.0.0-p247
我無處可去。 結果:
$ rvm install 2.0.0-p247
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p247.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247, this may take a while depending on your cpu(s)...
ruby-2.0.0-p247 - #downloading ruby-2.0.0-p247, this may take a while depending on your connection...
ruby-2.0.0-p247 - #extracted to /Users/xxxxx/.rvm/src/ruby-2.0.0-p247 (already extracted)
ruby-2.0.0-p247 - #configuring........
Error running './configure --prefix=/Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/xxxxx/.rvm/log/ruby-2.0.0-p247/1375141206_configure.log
There has been an error while running configure. Halting the installation.
我也在調試模式下運行此命令。 為避免混亂,您可以在此處訪問它。
此外,這是日志:
./configure
current path: /Users/xxxxx/.rvm/src/ruby-2.0.0-p247
command(7): ./configure --prefix=/Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --without-tcl --without-tk --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking whether the C compiler works... no
configure: error: in `/Users/xxxxx/.rvm/src/ruby-2.0.0-p247':
configure: error: C compiler cannot create executables
See `config.log' for more details
這是我第一次通過RVM安裝。 $ rvm list不返回任何寶石。
請詢問是否有任何其他信息可能有所幫助。
編輯 - HERE是可以幫助任何人的日志。
我的Xcode或我的命令行工具安裝肯定有問題。 重新安裝兩者使一切運行得很漂亮。
對於那些從您使用與查詢相同的錯誤從谷歌到達此處的人:
我遇到了同樣的問題,但是不想通過重新安裝xcode的漫長的過程,如建議的接受的答案。 我所做的就是跑了
rvm get stable
然后運行
rvm install ruby-2.0.0-p247
再次rvm install ruby-2.0.0-p247
我最初的問題
然后我跑了之后
rvm get stable
確保在XCode中安裝命令行工具,因為它不會自動執行(是的,我同意,默認情況下應該安裝命令行工具)但事實並非如此。
安裝XCode - >首選項 - >下載 - >“命令行工具”
編輯*錯過了整個“讓所有東西都運行得很漂亮”並打出這一切 -
干杯,很高興一切順利!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.