xapian-full 安装在 mac os x Snow leopard 上,但因 dlopen LoadError 失败
由于我尝试安装 xapian 但失败,因此我尝试使用 xapian-full 的另一种替代方案。安装似乎很顺利,但是当我尝试用它编写代码时,我再次收到错误消息:
irb(main):001:0> require 'xapian'
LoadError: dlopen(/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle, 9): Library not loaded: /usr/local/lib/libxapian-1.1.3.dylib
Referenced from: /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle
Reason: image not found - /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/xapian.rb:40
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):1
有人知道如何解决这个问题吗?
Since I have tried to install xapian but failed, I try another alternative with xapian-full. Installation seems goes well, but when I try to write code with that I got toasted with error message again:
irb(main):001:0> require 'xapian'
LoadError: dlopen(/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle, 9): Library not loaded: /usr/local/lib/libxapian-1.1.3.dylib
Referenced from: /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle
Reason: image not found - /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/xapian.rb:40
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):1
Anyone know how to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
到目前为止,在 OSX 上安装 xapian 的最简单方法
可能对你和我一样有效。签出自制程序,http://github.com/mxcl/homebrew/ blob/master/Library/Formula/xapian.rb 特别是。
by far the easiest way to install xapian on OSX is
maybe this will work for you as nicely as it has worked for me. checkout homebrew, http://github.com/mxcl/homebrew/blob/master/Library/Formula/xapian.rb in particular.
这个问题涉及 Ruby gem,而不是库本身。
我在尝试安装 xapian-fu 时遇到了同样的问题,并通过执行以下操作解决了它
(将 RubyGems 路径替换为您的安装路径) 。
This question pertains to the Ruby gem, not the library itself.
I had the same problem trying to install the xapian-fu, and solved it by doing
(substitute the RubyGems path with the path to your installation).
我已经以困难的方式完成了这一点,并且我发现网络上的说明似乎非常特定于操作系统和 Xapian 版本(因此是尽可能使用brew 的动机)。
但是,如果您正在寻找如何自行设置它,这里是我的最新说明,今天早上使用 Xapian v1.2.3(撰写本文时最新的稳定版本)在全新的安装 OS X 10.6.4 (Snow Leopard)。
确保您首先安装了 XCode。它包括您需要的编译器工具。
参考:
http://www.telos.co.nz/2009/09/install-xapian-on-mac-os-x-10-6/" telos.co.nz/2009/09/install-xapian-on-mac-os-x-10-6/
http://locomotivation.squeejee.com/post/109279130/simple-ruby-on-rails-full-text-search-using-xapian
I've done this the hard way, and I've found that the instructions out on the web seem to be very OS- and Xapian-version specific (hence the motivation for using brew when you can).
However, if you're looking for how to set it up yourself, here are my latest instructions, built successfully just this morning, using Xapian v1.2.3 (the latest stable build at the time of this writing), on a brand-new install of OS X 10.6.4 (Snow Leopard).
Make sure you have XCode installed first. It includes compiler tools that you'll need.
References:
http://www.telos.co.nz/2009/09/install-xapian-on-mac-os-x-10-6/
http://locomotivation.squeejee.com/post/109279130/simple-ruby-on-rails-full-text-search-using-xapian
此问题已在 https://github.com/rex1fernando/xapian-full 中修复。从那里下载更新的 Rakefile 并将其放入
通过键入重建 gem
中,问题应该得到解决。
更新:rex1fernando在http:// /masanjin.net/sup-bugs/msg323:
This issue is fixed in https://github.com/rex1fernando/xapian-full. From there, download the updated Rakefile and place it in
Rebuild the gem by typing
and the problem should be solved.
Update: rex1fernando recommends a nicer procedure in http://masanjin.net/sup-bugs/msg323: