mac安装rails时,安装不上,报错。

步步615 发布于 2014/04/24 17:00
阅读 473
收藏 0

用brew,已经安装完了ruby,版本:ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

看网上的文档,说输入sudo gem install rails 就可以安装rails了。。可是我输入完,输完密码后,出现下面的信息。。肿么办??求指教~!

Building native extensions.  This could take a while...

ERROR:  Error installing rails:
ERROR: Failed to build gem native extension.


    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile


make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1




Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
1 gem installed
加载中
0
YanhaoYang
YanhaoYang


据说加上以下环境变量可以解决这个问题:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments


参见: http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa


返回顶部
顶部