Red HatEnterpriseボックスにインストールされたMapnik2.1へのPythonバインディングを取得し、Sage(sagemath.org)で使用しようとしています。これは私がyumを使用できない会社のマシンなので、ずっとターボールです、ベイビー。
依存関係をインストールし、各構成に必要な構文を作成する際の問題は、すでに解決しています。ある問題を解決するたびに、別の問題があります。現在、mapnikを構成してlibboost_system.soを表示することはできません。libboost_system.soは間違いなく/ usr / local / libにあり、/ usr/libからそれを指すシンボリックリンクがあります。
詳細:
Red Hat Enterprise system:
> more /proc/version
Linux version 2.6.18-92.el5PAE (brewbuilder@hs20-bc2-3.build.redhat.com) (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を実行しました-上記のWebページの手順を使用して、この方法でブーストの一部を再インストールしました:)
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(mapnikでのユニコード正規表現サポートには、オプションのICUユニコードサポートで構築されたlibboost_regexが必要です。)
curl(「osm」プラグインにはlibcurlが必要です-詳細:https ://github.com/mapnik/mapnik/wiki//OsmPlugin )
pg_config(pg_configプログラム| PG_CONFIG SConsオプションを設定してみてください)
sqlite3(SQLite3Cライブラリ|SQLITE_LIBSおよびSQLITE_INCLUDESで構成|詳細:https ://github.com/mapnik/mapnik/wiki//SQLite )
sqlite_rtree(SQLiteプラグインにはRTREEサポート(-DSQLITE_ENABLE_RTREE = 1)で構築されたlibsqlite3が必要です)
cairo(CairoCライブラリ|pkg-configを使用して構成|PKG_CONFIG_PATH SConsオプションを設定してみてください)
pycairo(CairoライブラリへのPythonバインディング|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.7Python2.7プレフィックス.../opt / sage-5.2 /localPythonバインディングはインストールされます.../opt / sage-5.2 / local / lib / python2.7 / site-パッケージ構成が完了しました:実行
make
してビルドまたはmake install
「make」... / usr / bin / ld:見つかりません-lsqlite3 collect2:エラー:ldが1つの終了ステータスsconsを返しました:* [tests / cpp_tests /csv_parse_test-bin]エラー1scons:エラーのため、ビルドが終了しました。make:* [mapnik]エラー2"
しかし、sqlite3はオプションだと思いました...
sqlite3の問題は赤いニシンかもしれないと思います。以前の問題は、configureステージで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)
だからそれは本当にそこにあり、有効です。
そして、安全のために(これは役に立ちませんでした)、シンボリックリンクを追加しました:
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
他のライブラリが同じ場所で問題なく検出されているため、これは奇妙なことです。また、configureステージは、「ブーストライブラリとヘッダーを検索しています...ライブラリが見つかりました:/ usr / local/lib」というエラーの前に数行を示しました。
現時点では、私は本当にスコンを信用していません。mapnik configureステージがライブラリ(libproj)を見つけられないという別の問題がありました。その後、ブーストのバージョンは少なくとも1.48ではないと述べました。proj .soファイルを指す正しいシンボリックリンクを追加するとすぐに、ブーストのバージョンに関する設定エラーが消えました。だから私はあなたが最初に見つけたエラーに焦点を合わせてそれを解決するべきであるという一般的なルールに固執しています。
Pythonの非標準の場所(PYTHON = / opt / sage-5.2 / local / bin / python)は問題ないように見えることに注意してください。
mapnikログファイルconfig.logを確認していますが、追加情報はありません。Webとgithub.com/mapnik/mapnik/wiki/InstallationTroubleshootingを確認しましたが、関連性はありません。長い投稿で申し訳ありませんが、詳細は重要です。読んでくれてありがとう。
別の手がかりは次のとおりです。
Checking if boost_regex was built with ICU unicode support... (cached) no
上記はこれが正しく行われたことを示していますが(?)。