【发布时间】:2014-12-09 05:56:03
【问题描述】:
升级到 yosemite 后无法运行 bundle install,mkmf.log 内容如下
/usr/local/opt/gcc46/bin/gcc-4.6 -o conftest -I/Users/mac/.rvm/rubies/ruby-1.9.3-p547/include/ruby-1.9.1/x86_64-darwin12.4.0 -I/Users/mac/.rvm/rubies/ruby-1.9.3-p547/include/ruby-1.9.1/ruby/backward -I/Users/mac/.rvm/rubies/ruby-1.9.3-p547/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/mac/.rvm/rubies/ruby-1.9.3-p547/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.1.9.1 -lpthread -ldl -lobjc
它似乎正在尝试使用 gcc-4.6,但是当我执行 gcc -v 时,它给了我这个
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix
我也尝试用 ln -s 链接/usr/local/opt/gcc46/bin/gcc-4.6,但没有任何帮助,我不断收到
/Users/mac/.rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb checking if the C compiler accepts ... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options..
任何帮助将不胜感激
【问题讨论】:
-
您尝试安装什么 gem?你在更新到优胜美地之前安装了 ruby 吗?
-
安装 nokogiri 时捆绑包失败,是的,我之前在山狮的轨道上使用 ruby,然后我升级到优胜美地
标签: ruby-on-rails macos gcc gem