gpt4 book ai didi

ruby-on-rails - 安装 bson_ext 失败

转载 作者:行者123 更新时间:2023-12-02 04:43:33 25 4
gpt4 key购买 nike

hs-mac-air:~ zuohaisu$ sudo gem install bson_ext -v '1.9.2'
Building native extensions. This could take a while...
ERROR: Error installing bson_ext:
ERROR: Failed to build gem native extension.

/Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb
checking for asprintf()... *** 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/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/bin/ruby
/Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/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/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:893:in `have_func'
from extconf.rb:3:in `<main>'


Gem files will remain installed in /Users/zuohaisu/.rvm/gems/ruby-1.9.3-p429/gems/bson_ext-1.9.2 for inspection.
Results logged to /Users/zuohaisu/.rvm/gems/ruby-1.9.3-p429/gems/bson_ext-1.9.2/ext/cbson/gem_make.out

我尝试安装 bson_ext 但总是失败。有人可以帮忙吗?我的 rails 版本是 1.9.3我的 Mongo shell 版本是 2.4.3我的 Rails 版本是 4据说有些图书馆不见了。这是什么意思?

最佳答案

尝试

gem update --system
gem install bson_ext

如果一切都失败了,下载 gem http://rubygems.org/gems/bson_ext并手动将其添加到您的 gemsets

关于ruby-on-rails - 安装 bson_ext 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20313451/

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