2

升级到 OS X 10.6 后,我遇到了各种与 MacPorts 相关的特殊问题,但大多数问题都已通过根据需要简单地重建库来解决。有一个问题我似乎无法通过该方法解决,甚至重新构建所有端口,完全删除旧的 /opt 目录,也没有任何效果:

$ rsync example.com:foo .
Password:
dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
  Referenced from: /opt/local/lib/libpopt.0.dylib
  Reason: image not found
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(601) [Receiver=3.0.7]

但是,有问题的库确实存在,这确实令人沮丧:

$ otool -L /opt/local/lib/libintl.8.dylib
/opt/local/lib/libintl.8.dylib:
    /opt/local/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.2.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.0.0)

这是来自安装的 gettext 包:

$ port provides /opt/local/lib/libintl.8.dylib
/opt/local/lib/libintl.8.dylib is provided by: gettext

$ port installed | grep gettext
  gettext @0.17_4+universal (active)
  p5-locale-gettext @1.05_0 (active)

文件在那里:

$ ls -l /opt/local/lib/libintl.8.dylib
lrw-r--r--  1 root  admin  19 Jan 12 17:22 /opt/local/lib/libintl.8.dylib@ -> libintl.8.0.2.dylib
$ ls -l /opt/local/lib/libintl.8.0.2.dylib
-rw-r--r--  2 root  admin  98736 Jan 12 17:22 /opt/local/lib/libintl.8.0.2.dylib

我已经搜索过此类错误,但它们似乎都已过时。以前有没有人解决过这个问题?

4

1 回答 1

3

您可以使用“文件”命令查看 dylib 中存在哪些架构:

文件 /opt/local/lib/libintl.8.0.2.dylib

如果只存在 ppc 和 i386,而您需要 x86_64,则无法加载该库。

于 2010-08-07T18:05:31.210 回答