Mac Snow Leopard 上的 Curb gem 出现问题
这消耗了我几个小时的时间。
在控制台中我运行: require '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 卷曲包。
我也尝试从源安装并收到此错误
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...]
建议?
This has consumed hours of my time.
in the console i run: require 'curb'
i get the error:
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
I have tried uninstalling the gem and reinstalling a number of versions with ARCHFLAGS="-arch i386"
No errors or warnings are given in the install
When i try and install with: rake install
I get this error as well.
I am working on a mac ox 10.6 with ruby 1.8
i notice there are libcurl.4.dylib, libcurl.3.dylib, and libcurl.2.dlib and libcurl.dylib in my /usr/lib folder...
I did an install of the newest 7.20 curl package.
I have tried to install from the source as well and get this error
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...]
Suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只是尝试:
为我工作。
just try :
Worked for me.
我遇到了一个非常相似的问题,也消耗了我几个小时的时间。后来在尝试使用代理时遇到了更多问题,但为了解决该错误,我必须从 sourceforge 下载 libcurl 源代码并构建它。
我相信 Snow Leopard 放弃了 PPC 支持,并且该库可能不是 x86 原生的。重新编译可以解决此问题(可能),因此请尝试一下。
I had a very similar issue that also consumed hours of my time. I'm running into more problems later when trying to use a proxy but to get around that error I had to download the libcurl source from sourceforge and build it.
I believe Snow Leopard dropped PPC support and this library may not be x86 native. Recompiling fixes this issue (possibly), so give it a try.
当我从 rvm 切换到 chruby 时,出现了这个问题。
请注意这一点:
库未加载:/Users/lfender/.rvm/rubies/ruby-1.9.3-p484/lib/libruby.1.9.1.dylib
。因为我从 rvm 切换了 ruby 版本控制系统,所以我需要使用正确的包重建 gem。This issue occurred for me when switching from rvm to chruby.
Note this bit:
Library not loaded: /Users/lfender/.rvm/rubies/ruby-1.9.3-p484/lib/libruby.1.9.1.dylib
. Because I switch my ruby versioning system from rvm, I needed to rebuild the gem with the correct packages.