rvm install 1.9.3 --with-gcc=clang
(根据建议无法使用 RVM 在 Lion 下安装 Ruby – GCC 问题 https://stackoverflow.com/questions/8032824/cant-install-ruby-under-lion-with-rvm-gcc-issues)不起作用,因为 Mac OS X 10.8.2 (Mountain Lion) 和 Xcode 4.5 均未附带clang
.
是否可以用以下命令编译 Rubyllvm
?
根据Matthias Schmidt 的“如何使用 LLVM 和 rbenv 在 Mac OS X 上安装 Ruby 1.9.3” http://m-schmidt.eu/2012/02/25/how-to-install-ruby-on-mac-os-x-with-llvm-and-rbenv/,Ruby 现在与 LLVM 完全兼容。
但是,我仍然得到:error: C compiler cannot create executables
UPDATE:
其实我发现clang
here /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
(感谢Node.js 安装维基 https://github.com/joyent/node/wiki/Installation)。我只是没有clang
在我的道路上。
所以,如果我添加clang
我的道路是rvm install 1.9.3 --with-gcc=clang
充足的?
来自 RVM 注释:
Homebrew:
如果您正在使用Homebrew https://brew.sh/,您可以从 homebrew/dupes 安装 apple-gcc42 和所需的库:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
它可以与现有的 Xcode 4.2+ 安装或 Xcode 命令行工具并存。
osx-gcc-安装程序:
如果您不使用 Homebrew,可以下载并安装 osx-gcc-installer:
https://github.com/kennethreitz/osx-gcc-installer https://github.com/kennethreitz/osx-gcc-installer.
希望它能帮助你。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)