繁体   English   中英

在OSX 10.7上,ruby-2.0.0-p247的RVM安装失败

[英]RVM installation of ruby-2.0.0-p247 fails on OSX 10.7

我一直在尝试通过rvm在运行OSX 10.7的机器上安装Ruby 2,但无论我尝试什么,都会遇到编译问题。

到目前为止,我已经尝试使用OSX GCC安装程序,重新安装Xcode两次(首先尝试DMG,然后是App商店),并重新安装了命令行工具。

gcc和clang的编译都失败了。

这是它失败的原因(来自〜/ .rvm / src / ruby​​-2.0.0-p247 / config.log):

configure:3776: checking whether the C compiler works
configure:3798: /usr/bin/clang  --I/usr/local/opt/freetype/include -L/usr/local/opt/freetype/lib conftest.c  >&5
clang: error: unsupported option '--I/usr/local/opt/freetype/include'

这会导致./configure输出checking whether the C compiler works... no

据我所知,该选项的正确语法应该是-I ,而不是--I - 如何让configure配置为使用正确的选项?

编辑:从源代码编译而不使用rvm会导致同样的问题。

事实证明,我的CPPFLAGS环境变量是罪魁祸首。

运行CPPFLAGS='-I/usr/local/opt/freetype/include' rvm install ruby-2.0.0-p247就可以了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM