Lion OSX:如何安装libfreetype.6.dylib?[英] Lion OSX: How to install libfreetype.6.dylib?

本文是小编为大家收集整理的关于Lion OSX:如何安装libfreetype.6.dylib?的处理方法,想解了Lion OSX:如何安装libfreetype.6.dylib?的问题怎么解决?Lion OSX:如何安装libfreetype.6.dylib?问题的解决办法?那么可以参考本文帮助大家快速定位并解决问题。

问题描述

我正在尝试安装 ruby​​ gem,但安装过程已停止,因为:

ld: file not found: /usr/local/lib/libfreetype.6.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何安装这个库?我检查了 /usr/local/lib/ 并且那里缺少库.

编辑:

我运行 locate libfreetype.6.dylib 并得到:

/Applications/MAMP/Library/lib/libfreetype.6.dylib
/Applications/VLC.app/Contents/MacOS/lib/libfreetype.6.dylib
/Applications/XAMPP/xamppfiles/lib/libfreetype.6.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/lib/libfreetype.6.dylib
/Applications/calibre.app/Contents/Frameworks/libfreetype.6.dylib
/Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib
/Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM
/Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents
/Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Info.plist
/Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources
/Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF
/Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF/libfreetype.6.dylib
/Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib
/Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM
/Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents
/Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Info.plist
/Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources
/Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF
/Users/v/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF/libfreetype.6.dylib
/opt/X11/lib/libfreetype.6.dylib
/usr/local/Cellar/freetype/2.4.10/lib/libfreetype.6.dylib

但是为什么系统找不到库呢?

推荐答案

你要安装什么库?会不会是 ImageMagick?另外,如果是 RubyGem,为什么帖子会被标记为 homebrew?

无论如何,我在安装 ImageMagick 时遇到此错误,您需要将 /opt/X11/lib/libfreetype.6.dylib 符号链接到 /usr/local/lib.

这样做:

ln -s /opt/X11/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.6.dylib

本文地址:https://www.itbaoku.cn/post/786586.html