runtime无法执行grep_编译器无法生成可执行文件。 (RuntimeError)

在升级到OS Mountain Lion后,尝试安装依赖gem sys-proctable时遇到错误。Gem安装过程中报告无法创建Makefile,原因是缺少必要的库和/或头文件。尽管已安装开发者工具,但gem install sys-proctable -v '0.9.2'仍然失败,提示需要先安装开发工具。问题根源是RailsInstaller OSX 1.0.3的bug,解决方法是在/etc/rvmrc中添加umask g+w和环境变量设置。
摘要由CSDN通过智能技术生成

I recently upgraded to OS Mountain Lion. A project I'm working on requires gem sys-proctable as a dependency, but when I run bundle install I get:

Fetching gem metadata from https://rubygems.org/.........

.

.

.

Installing sys-proctable (0.9.2) with native extensions

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for rb_pid_t in ruby.h... *** 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.

Provided configuration options:

--with-opt-dir

--with-opt-include

--without-opt-include=${opt-dir}/include

--with-opt-lib

--without-opt-lib=${opt-dir}/lib

--with-make-prog

--without-make-prog

--srcdir=.

--curdir

--ruby=/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/bin/ruby

/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)

You have to install development tools first.

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1022:in `try_type'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1050:in `block in have_type'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1049:in `have_type'

from extconf.rb:3:in `'

Gem files will remain installed in /Users/mgriffel/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/sys-proctable-0.9.2-universal-darwin for inspection.

Results logged to /Users/mgriffel/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/sys-proctable-0.9.2-universal-darwin/ext/darwin/gem_make.out

An error occurred while installing sys-proctable (0.9.2), and Bundler cannot continue.

Make sure that `gem install sys-proctable -v '0.9.2'` succeeds before bundling.

But I do have developer tools installed! Running gem install sys-proctable -v '0.9.2' gives me nearly the same error:

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

ERROR: Error installing sys-proctable:

ERROR: Failed to build gem native extension.

/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for rb_pid_t in ruby.h... *** 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.

Provided configuration options:

--with-opt-dir

--with-opt-include

--without-opt-include=${opt-dir}/include

--with-opt-lib

--without-opt-lib=${opt-dir}/lib

--with-make-prog

--without-make-prog

--srcdir=.

--curdir

--ruby=/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/bin/ruby

/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)

You have to install development tools first.

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1022:in `try_type'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1050:in `block in have_type'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'

from /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'

from /Users/mgriffe

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值