hpricot_scan.bundle: dlopen no suitable image found. Did find: (LoadError)
程序员文章站
2024-03-11 17:07:13
...
原来好好的项目,今天启动的时候提示:
/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.2/lib/hpricot_scan.bundle: dlopen(/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.2/lib/hpricot_scan.bundle, 9): no suitable image found. Did find: (LoadError)<br> /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.2/lib/hpricot_scan.bundle: mach-o, but wrong architecture - /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.2/lib/hpricot_scan.bundle
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.2/lib/hpricot.rb:20
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 ./../require_file.rb:5
from client_server.rb:310:in `require'
from client_server.rb:310
查到:http://*.com/questions/1367380/snow-leopard-64-bit-ruby-gem-problem
于是:
1
2
|
HoLin :server holin$ irb
>> `gem list`.each_line {|line| `sudo env ARCHFLAGS = "-arch x86_64" gem install #{line.split.first}`}
|
还是没用。
1
2
3
4
5
|
HoLin:~ holin$ file /usr/bin/ruby /usr/bin/ruby: Mach-O universal binary with 3 architectures /usr/bin/ruby (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/ruby (for architecture i386): Mach-O executable i386 /usr/bin/ruby (for architecture ppc7400): Mach-O executable ppc |
1
2
|
HoLin:~ holin$ file /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.2/lib/hpricot_scan.bundle /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.2/lib/hpricot_scan.bundle: Mach-O 64-bit bundle x86_64 |
sudo env ARCHFLAGS="-arch i386 -arch x86_64" gem install hpricot
which ruby
/usr/local/bin/ruby
HoLin:~ holin$ file /usr/local/bin/ruby /usr/local/bin/ruby: Mach-O executable i386
最后,确认你调用的ruby和hpricot一样.
首发: http://www.holin.info/posts/4c5c018eff1f01709d000002
--EOF--上一篇: Tensorflow模型建立与训练
下一篇: 11 tensorflow 张量排序