我只是試圖將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
即使上面顯示,這是正確完成(?)。
爲什麼選擇投票?這是一個有用的帖子。 –