尝试在 OSX 10.8 上编译 Mapnik
因此,在我克隆 Github 存储库后,我像这样运行配置命令:
./configure
然后得到错误:
Checking for C++ library icuuc... no
Could not find required header or shared library for icuuc
然后:
Exiting... the following required dependencies were not found:
- icuuc (ICU C++ library | configure with ICU_LIBS & ICU_INCLUDES or use ICU_LIB_NAME to specify custom lib name | more info: http://site.icu-project.org/)
查看 Mapnik 故障排除区域以获取解决方案:https ://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting
说:Solution: If g++ is available then ICU must be in a custom location so set the paths to the libs and includes - ie. ICU_LIBS=/usr/local/lib and ICU_INCLUDES=/usr/local/include.
通过g++
从命令行运行,我得到:i686-apple-darwin11-llvm-g++-4.2: no input files
所以这意味着 g++ 可用,但我不知道如何设置路径以便 configure 可以找到它们。
ICU 库默认安装或使用自制软件安装,不确定是哪个。
terminal: brew install icu4c
Warning: icu4c-51.1 already installed
找到 icu4c 安装目录:
terminal: mdfind icu4c
/usr/local/Cellar/icu4c