OS X Yosemite ffi-hunspell dyld懒惰符号绑定失败:未找到符号

时间:2014-10-21 15:53:49

标签: ruby macos ffi osx-yosemite dyld

自升级以来,我在运行测试时遇到此错误:

dyld: lazy symbol binding failed: Symbol not found: __ZN8HunspellC2EPKcS1_S1_
  Referenced from: /usr/lib/libhunspell-1.2.dylib
  Expected in: flat namespace

dyld: Symbol not found: __ZN8HunspellC2EPKcS1_S1_
  Referenced from: /usr/lib/libhunspell-1.2.dylib
  Expected in: flat namespace
  • 我尝试重新安装宝石,新鲜红宝石安装,红宝石1.9.3和2.1.2
  • 它特定于系统hunspell版本,但我无法看到如何在不编辑ffi-hunspell gem的情况下停止加载ffi
  • 我已经使用xcode-select --install安装了更新的xcode应用程序和命令行工具,它解决了nokogiri的一些问题,但没有解决这个问题

我认为这是Apple的hunspell 1.2版本的问题,因为if I remove 1.2 from the ffi-hunspell gem(捆绑打开ffi-hunspell)测试通过,假设加载了hunspell 1.3 I&#ve;安装自制软件。

有没有办法限制ffi查找库的位置?

另外,系统库的用途是什么?

3 个答案:

答案 0 :(得分:3)

  1. 可选brew update
  2. brew install hunspell安装版本1.3
  3. 将您的gemfile指向 gem 'ffi-hunspell', github: 'postmodern/ffi-hunspell'
  4. 它将停止加载系统库,不会再出现错误。

答案 1 :(得分:1)

将gem与github repo捆绑在一起应该修复此问题,直到将一个比0.3.0更新的版本发布到rubygems(This commit包含修复,但由于某种原因尚未释放)。

gem 'ffi-hunspell', github: 'postmodern/ffi-hunspell'

你应该需要做一个大开brew upgrade。首先尝试从github捆绑。

答案 2 :(得分:-1)

通常,在升级操作系统之后,您将不得不为宝石重建本机库。尝试:

gem pristine --all

The documentation解释了它。

相关问题