2

尝试在 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

4

3 回答 3

3

您可以将 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

于 2013-08-22T09:24:59.743 回答
2

根据我们的讨论和我的最后评论,类似以下内容可能会起作用。

export ICU_LIBS=/usr/local/Cellar/icu4c/lib
export ICU_INCLUDES=/usr/local/Cellar/icu4c/include
./configure
于 2013-08-14T19:47:57.960 回答
-1

如果您发现相同的错误:

Checking for C++ library XXX... no

听从命令

sudo apt-get install g++ libXXX-dev

使用提示(TAB按钮),您可以查看可用的 XXX 库

sudo apt-get install libXXX(press double TAB)
于 2015-11-09T13:50:10.370 回答