开发者社区> 问答> 正文

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

用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

展开
收起
爱吃鱼的程序员 2020-06-20 19:35:43 615 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB


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

    exportCFLAGS =- Qunused - argumentsexportCPPFLAGS =- Qunused - arguments


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


    2020-06-20 19:35:59
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载