我正在尝试在OS X 10.8.3上安装fontconfig,我被抛出了一个讨厌的错误。我已经安装了XCode 4.6.1
$ brew install fontconfig
==> Installing fontconfig dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.28.mountain_lion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.28.mountain_lion.bottle.tar.gz 🍺 /usr/local/Cellar/pkg-config/0.28: 10 files, 636K
==> Installing fontconfig
==> Downloading http://fontconfig.org/release/fontconfig-2.10.91.tar.gz Already downloaded: /Library/Caches/Homebrew/fontconfig-2.10.91.tar.gz
==> Patching patching file src/fcarch.h
==> ./configure --with-add-fonts=/Library/Fonts,~/Library/Fonts --prefix=/usr/local/Cellar/fontconfig/2.10.91
==> make install
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libfontconfig.la] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
关于这个问题的信息似乎很少,这让人很痛苦。
*SOLVED*
原来我设置了DYLD_LIBRARY_PATH env变量用于Oracle,这导致引用32位库。
取消设置DYLD_LIBRARY_PATH env变量可以解决这个问题。
任何在mac上使用Oracle客户端的人都应该警惕这一点!