gpt4 book ai didi

ruby-on-rails - 安装 ruby​​ debug19。编译器未能生成可执行文件

转载 作者:数据小太阳 更新时间:2023-10-29 08:51:31 25 4
gpt4 key购买 nike

我正在尝试安装 ruby​​ debug 19,这样我就可以运行 spork。尽管这非常令人沮丧,但我遇到了错误。我用谷歌搜索了一段时间无济于事。我正在运行 1.9.3-p194。

这是错误信息:

构建 native 扩展。这可能需要一段时间...错误:安装 ruby​​-debug19 时出错: 错误:无法构建 gem native 扩展。

    /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.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/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
/Users/jasonvdm/.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/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1002:in `block in have_struct_member'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1001:in `have_struct_member'
from extconf.rb:10:in `block in <main>'
from /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `call'
from /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `create_makefile_with_core'
from extconf.rb:24:in `<main>'

最佳答案

我遇到了类似的问题,但是安装了 nokogiri gem,我用以下方法解决了它:

cd /usr/bin
sudo ln -s llvm-gcc-4.2 gcc-4.2

参见 Bundle update & install fail after OS X lion upgrade - Rails 3

关于ruby-on-rails - 安装 ruby​​ debug19。编译器未能生成可执行文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11730422/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com