我只是试图将Python绑定到安装在Red Hat Enterprise Box上的Mapnik 2.1中,并在Sage(sagemath.org)中使用它们。这是一台公司机器,我不能使用yum,所以它一路上都是tarball,宝贝。Red Hat Linux上的mapnik安装失败
我已经解决了许多安装依赖关系的问题,并解决了每个配置需要的语法。每次我解决一个问题时,都会有另一个问题。目前我无法将mapnik配置为查看libboost_system.so,它绝对位于/ usr/local/lib中,并且具有指向/ usr/lib的符号链接。
细节:
Red Hat Enterprise system:
> more /proc/version
Linux version 2.6.18-92.el5PAE ([email protected]) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-41))
used install directions at github.com/mapnik/mapnik/blob/master/INSTALL.md, github.com/mapnik/mapnik/wiki/Mapnik2 and elsewhere
installed proj 4.8 from tarball using several solutions provided on the web to fix install problems
installed icu4c-4_6 from tarball to /usr/local/...
installed boost 1.51 from tarball pointing to the newly installed icu:
download boost_1_51_0.tar.gz
tar ...
cd boost_1_51_0
./bootstrap.sh
(前面我做了一个直./b2安装一切升压 - 回去使用上述网页说明重新安装升压的部分这样:)
sudo ./b2 --with-thread --with-filesystem --with-iostreams --with-python --with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/local/lib --with-program_options --with-system link=shared toolset=gcc stage
sudo ./b2 --with-thread --with-filesystem --with-iostreams --with-python --with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/local/lib --with-program_options --with-system link=shared toolset=gcc install
sudo /sbin/ldconfig
现在尝试安装Mapnik的:
download mapnik-v2.1.0.tar.bz2
tar ...
cd ...
./configure PYTHON=/opt/sage-5.2/local/bin/python ICU_LIBS=/usr/local/lib ICU_INCLUDES=/usr/local/include BOOST_INCLUDES=/usr/local/include/boost BOOST_LIBS=/usr/local/lib
或
./configure PYTHON=/opt/sage-5.2/local/bin/python ICU_LIBS=/usr/local/lib ICU_INCLUDES=/usr/local/include
或
./configure PYTHON=/opt/sage-5.2/local/bin/python
(相同的结果)
"scons: Reading SConscript files ...
Welcome to Mapnik...
Configuring build environment...
SCons CONFIG found: 'config.py', variables will be inherited...
Configuring on Linux in *release mode*...
Checking for freetype-config... yes
Checking for xml2-config... yes
Sorting lib and inc compiler paths...(cached) yes
Checking for C library m... yes
Checking for C library ltdl... yes
Checking for C library png... yes
Checking for C library tiff... yes
Checking for C library z... yes
Checking for C library proj... yes
Checking for C++ library icuuc... yes
Checking for C library jpeg... yes
Checking for ICU version >= 4.2... found: icu 4.6
(cached) Searching for boost libs and headers... (cached)
*libs found: /usr/local/lib
*headers found: /usr/local/include
*no lib naming extension found
Checking for Boost version >= 1.47... yes
Found boost lib version... 1_51
Checking for C++ library boost_system... yes
Checking for C++ library boost_filesystem... yes
Checking for C++ library boost_regex... yes
Checking for C++ library boost_program_options... yes
Checking for C++ library boost_thread... yes
.sconf_temp/conftest_18: error while loading shared libraries: libboost_system.so.1.51.0:
cannot open shared object file: No such file or directory
Checking if boost_regex was built with ICU unicode support... (cached) no
Checking for requested plugins dependencies...
Checking for gdal-config --libs... yes
Checking for gdal-config --cflags... yes
Checking for name of gdal library... gdal
Checking if gdal is ogr enabled... yes
Checking for name of ogr library... gdal
Checking for C library curl... no
Checking for pg_config... error: no result no
Checking for C library sqlite3... no
Checking if SQLite supports RTREE... (cached) no
Checking for pkg-config... yes
Checking for cairo... no
Checking for C++ header file boost/python/detail/config.hpp... yes
Checking for pkg-config... yes
Checking for pycairo... no
All Required dependencies found!
Overwriting and re-saving file 'config.py'...
Will hold custom path variables from commandline and python config file(s)...
注:将建立一个没有这些可选依赖关系:
boost_regex_icu(libboost_regex可选ICU Unicode支持建在mapnik中支持unicode正则表达式支持。 )
卷曲(libcurl中是必需的 “OSM” 插件 - 更多信息:https://github.com/mapnik/mapnik/wiki//OsmPlugin)
pg_config(pg_config程序|尝试设置PG_CONFIG SCons的选项)
sqlite3的(sqlite3的C库|与SQLITE_LIBS配置& SQLITE_INCLUDES |更多信息:https://github.com/mapnik/mapnik/wiki//SQLite)
sqlite_rtree(SQLite的插件需要与RTREE支持内置libsqlite3(-DSQLITE_ENABLE_RTREE = 1) )
开罗(开罗C库|尝试使用SCons PKG_CONFIG_PATH选项)
pycairo(Python绑定设置开罗库| |使用pkg配置配置CON通过使用pkg-config |来计算尝试设置PKG_CONFIG_PATH SCons的选项)
.sconf_temp/conftest_33:错误而载入共享库:libboost_system.so.1.51.0:无法打开共享对象文件:没有这样的文件或目录 发生问题,解析Mapnik的版本,回落至2.1.0 检查C头文件Python.h ...是 绑定Python版本... 2.7 Python 2.7前缀... /opt/sage-5.2/local Python绑定将安装在.../opt /sage-5.2/local/lib/python2。7 /站点包 配置完成:运行
make
建立或make install
“ 使 ” ...... 在/ usr /斌/劳工处:找不到-lsqlite3 collect2:错误:LD返回1个退出状态 scons的:* [tests/cpp_tests/csv_parse_test-bin]错误1 scons:建筑物由于错误而终止。 化妆:* [Mapnik的]错误2"
但我认为sqlite3的是可选...
我认为sqlite3的问题可能是红鲱鱼早期的问题是,配置阶段。 。没有找到boost_thread我的系统显示:
ls -l /usr/local/lib/libboost_system.so*
lrwxrwxrwx 1 root root 25 Sep 11 17:40 /usr/local/lib/libboost_system.so -> libboost_system.so.1.51.0
-rwxr-xr-x 1 root root 16898 Sep 11 17:40 /usr/local/lib/libboost_system.so.1.51.0
ldd /usr/local/lib/libboost_system.so.1.51.0
linux-gate.so.1 => (0x005c1000)
librt.so.1 => /lib/librt.so.1 (0x00cd9000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x002f4000)
libm.so.6 => /lib/libm.so.6 (0x009e1000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00f82000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00a6a000)
libc.so.6 => /lib/libc.so.6 (0x00110000)
/lib/ld-linux.so.2 (0x0050d000)
所以它真的存在和有效
而只是为了安全起见(没有不小时。 elp)添加了一个符号链接:
ls -l /usr/lib/libboost_system.so
lrwxrwxrwx 1 root root 33 Sep 14 10:16 /usr/lib/libboost_system.so -> /usr/local/lib/libboost_system.so
这很奇怪,因为其他库在相同位置被发现很好。另外,配置阶段在“搜索boost库和头文件... libs找到:/ usr/local/lib”错误之前指出了几行。在这一点上,我并不真正相信scons。我有另一个mapnik配置阶段无法找到库(libproj)的问题。然后它后来表示升压的版本不是至少1.48。只要我添加指向proj .so文件的正确符号链接,关于boost版本的配置错误就消失了。所以我坚持一般规则,你应该把重点放在找到的第一个错误上并解决这个错误。
请注意,Python的非标准位置(PYTHON =/opt/sage-5.2/local/bin/python)似乎没问题。
看看mapnik日志文件config.log,但没有可以看到的其他信息。检查了网页和github.com/mapnik/mapnik/wiki/InstallationTroubleshooting,但没有任何相关性。对不起,很长的文章,但细节很重要。谢谢阅读。
另一条线索可能是:
Checking if boost_regex was built with ICU unicode support... (cached) no
即使上面显示,这是正确完成(?)。
为什么选择投票?这是一个有用的帖子。 –