由于我尝试安装 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

有谁知道如何解决这个问题?

最佳答案

到目前为止,在 OSX 上安装 xapian 的最简单方法是

sudo brew install xapian --python --ruby #etc

也许这对你有用,就像对我有用一样。结帐自制软件,尤其是 http://github.com/mxcl/homebrew/blob/master/Library/Formula/xapian.rb

关于ruby - xapian-full 安装在 mac os x snow leopard 上,但因 dlopen LoadError 失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2565082/

10-11 17:35