gpt4 book ai didi

ruby - 安装 Ruby - RVM - Mac OSX Mountain Lion

转载 作者:数据小太阳 更新时间:2023-10-29 08:39:01 25 4
gpt4 key购买 nike

所以我正在尝试在运行 Mountain Lion 的 Mac 上安装 Ruby 1.9.3。我安装了 xCode 并且是最新的。我已经安装了 RVM,现在正在尝试使用 rvm install 1.9.3 安装 Ruby 当我运行它时,它看起来像是要安装但给我一个错误,请参见下面:

rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p392.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Already up-to-date.
Certificates in '/Users/Colin/.rvm/etc/openssl/cert.pem' already are up to date.
Installing Ruby from source to: /Users/Colin/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
ruby-1.9.3-p392 - #extracted to /Users/Colin/.rvm/src/ruby-1.9.3-p392 (already extracted)
ruby-1.9.3-p392 - #configuring........
Error running './configure --prefix=/Users/Colin/.rvm/rubies/ruby-1.9.3-p392 --with-opt-dir=/Users/Colin/.rvm/opt/libyaml:/Users/Colin/.rvm/opt/readline:/Users/Colin/.rvm/opt/libxml2:/Users/Colin/.rvm/opt/libxslt:/Users/Colin/.rvm/opt/libksba:/Users/Colin/.rvm/opt/openssl:/Users/Colin/.rvm/opt/sqlite --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/Colin/.rvm/log/ruby-1.9.3-p392/1366429269_configure.log
There has been an error while running configure. Halting the installation.

当我转到/1366429269_configure.log 文件时,它显示如下:

[2013-04-19 20:41:09] ./configure
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/Colin/.rvm/src/ruby-1.9.3-p392':
configure: error: C compiler cannot create executables
See `config.log' for more details

如果有人能帮助我,我将不胜感激!

编辑:

我在这里尝试了解决方案 Can't install Ruby under Lion with RVM – GCC issues rvm install 1.9.3 --with-gcc=clang 它发生了一些变化,这是新的输出:

rvm install 1.9.3 --with-gcc=clang
Installing requirements for osx, might require sudo password.
Already up-to-date.
Certificates in '/Users/Colin/.rvm/etc/openssl/cert.pem' already are up to date.
Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/Colin/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
ruby-1.9.3-p392 - #extracted to /Users/Colin/.rvm/src/ruby-1.9.3-p392 (already extracted)
ruby-1.9.3-p392 - #configuring.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
ruby-1.9.3-p392 - #compiling..................................................................
Error running 'make -j8',
please read /Users/Colin/.rvm/log/ruby-1.9.3-p392/1366431470_make.log
There has been an error while running make. Halting the installation.

下面是日志:http://pastebin.com/P6nTZRQY

编辑

不确定发生了什么,但我只是尝试了同样的事情,现在一切正常。感谢所有留下有用评论的人,非常感谢!

最佳答案

你需要将命令行工具更新到最新版本,同样对于ruby 1.9.3,仍然首选使用gcc-4.2进行编译。

还要确保在重试之前更新 RVM:

rvm get head
rvm install 1.9.2

最后,Ruby 2.0.0 应该与 1.9.3 兼容,您应该更新。

关于ruby - 安装 Ruby - RVM - Mac OSX Mountain Lion,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16116368/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com