在OSX10.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++是可用的,但我不知道如何设置路径,以便配置者能够找到它们。
默认情况下或使用自制软件安装了ICU库,但不确定是哪一个。
terminal: brew install icu4c
Warning: icu4c-51.1 already installed
查找icu4c安装目录:
terminal: mdfind icu4c
/usr/local/Cellar/icu4c
发布于 2013-08-14 19:47:57
根据我们的讨论和我最后的评论,下面这样的内容可能会奏效。
export ICU_LIBS=/usr/local/Cellar/icu4c/lib
export ICU_INCLUDES=/usr/local/Cellar/icu4c/include
./configure
发布于 2013-08-22 09:24:59
可以将ICU_LIB/INCLUDE的路径添加到配置命令中:
./configure ICU_INCLUDES=/usr/local/Cellar/icu4c/include ICU_LIBS=/usr/local/Cellar/icu4c/lib
有关接受哪些选项的配置的更多帮助,请执行以下操作:
./configure --help
对于安装参考,您可以检查以下内容:https://github.com/mapnik/mapnik/blob/v2.2.0/INSTALL.md
发布于 2015-11-09 13:50:10
如果您发现相同的错误:
Checking for C++ library XXX... no
遵循命令
sudo apt-get install g++ libXXX-dev
使用提示(TAB按钮),您可以看到哪些XXX库可用。
sudo apt-get install libXXX(press double TAB)
https://stackoverflow.com/questions/18239488
复制相似问题