在Mac Snow Leopard上遇到Curb gem的问题[英] Having Issues with Curb gem on Mac Snow Leopard

本文是小编为大家收集整理的关于在Mac Snow Leopard上遇到Curb gem的问题的处理方法,想解了在Mac Snow Leopard上遇到Curb gem的问题的问题怎么解决?在Mac Snow Leopard上遇到Curb gem的问题问题的解决办法?那么可以参考本文帮助大家快速定位并解决问题。

问题描述

这占用了我几个小时的时间.

在我运行的控制台中:需要'curb'

我得到了错误:

LoadError: dlopen(/usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle, 9): no suitable image found. Did find:

/usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle: mach-o, but wrong architecture - /usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle
from /usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from ./lib/tokbox/base_api.rb:7

我尝试卸载 gem 并使用 ARCHFLAGS="-arch i386" 重新安装多个版本安装中没有给出错误或警告当我尝试安装时:rake install我也收到此错误.

我正在使用 ruby​​ 1.8 开发 mac ox 10.6

我注意到我的/usr/lib 文件夹中有 libcurl.4.dylib、libcurl.3.dylib、libcurl.2.dlib 和 libcurl.dylib...

我安装了最新的 7.20 curl 包.

我也尝试从源安装并得到这个错误

localhost:taf2-curb-ac0b465 user$ rake install
(in /Users/user/Downloads/taf2-curb-ac0b465)
/Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle: dlopen(/Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle, 9): no suitable image found.  Did find: (LoadError)
    /Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle: mach-o, but wrong architecture - /Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle
    from /Users/user/Downloads/taf2-curb-ac0b465/lib/curb.rb:1
    from /Users/user/Downloads/taf2-curb-ac0b465/tests/helper.rb:12:in `require'
    from /Users/user/Downloads/taf2-curb-ac0b465/tests/helper.rb:12
    from ./tests/tc_curl_download.rb:1:in `require'
    from ./tests/tc_curl_download.rb:1
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -I"lib" "/usr/local/li...]

建议?

推荐答案

试试看:

sudo env ARCHFLAGS="-arch x86_64" gem install curb

为我工作.

本文地址:https://www.itbaoku.cn/post/786795.html