我更新了XQuartz,现在它不能加载,并抱怨说:
Dyld Error Message:
Library not loaded: /opt/X11/lib/libfreetype.6.dylib
Referenced from: /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin
Reason: Incompatible library version: X11.bin requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0但是,如果我使用otool -L /opt/X11/lib/libfreetype.6.dylib
/opt/X11/lib/libfreetype.6.dylib:
/opt/X11/lib/libfreetype.6.dylib (compatibility version 14.0.0, current version 14.2.0)
...所以这个库就是正确的版本!
导致此错误的原因是什么?
发布于 2014-12-29 04:16:09
这样的错误是由用户在其环境中设置DYLD_LIBRARY_PATH引起的。这可能是在/etc/launchd.conf、/etc/profile、/etc/bashrc、~/.profile、~/.bashrc、~/.bash_profile或类似文件中完成的。
DYLD_LIBRARY_PATH包含一个目录,其中包含一个名为libfreetype.6.dylib的文件,而不是XQuartz包含的文件。
无论是谁给了你设置DYLD_LIBRARY_PATH的建议,他很可能是错的。它应该只在非常特殊的情况下使用,例如在开发环境中。几乎不应该在发布产品时使用它,也不应该在您的shell环境中将其设置为常规解决方法。
https://stackoverflow.com/questions/8216350
复制相似问题