質問: postgisを読み込めませんでした-2.4.so「未定義のシンボル:float8getdatum」 archlinuxでpostgresql10.1にアップグレードしました。新しいデータベースを作成し、postgisをインストールしようとしていますが、次のエラーが発生します:local=# create extension postgis; error: could not load library "/usr/lib/postgresql/postgis-2.4.so": /usr/lib/postgresql/postgis-2.4.so: undefined symbol: float8getdatum ldd出力:$ ldd /usr/lib/postgresql/postgis-2.4.so linux-vdso.so.1 (0x00007ffec6f4d000) libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0x00007f6e00788000) libproj.so.12 => /usr/lib/libproj.so.12 (0x00007f6e0051e000) libjson-c.so.2 => /usr/lib/libjson-c.so.2 (0x00007f6e00313000) libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f6dfffad000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f6dffc61000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f6dff8a9000) libgeos-3.6.2.so => /usr/lib/libgeos-3.6.2.so (0x00007f6dff4fc000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6dff175000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6dfef5e000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6dfed40000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6dfeb3c000) libicuuc.so.59 => /usr/lib/libicuuc.so.59 (0x00007f6dfe78c000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f6dfe575000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f6dfe34f000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6e00c6b000) libicudata.so.59 => /usr/lib/libicudata.so.59 (0x00007f6dfc83c000) 私が理解している限り、「未定義のシンボル」とは、ライブラリ間に互換性がないことを意味しますが、pacman.confで無視されるパッケージがないため、非互換性がどこから発生するのかわかりません。編集:ld -v出力:$ ld -v /usr/lib/postgresql/postgis-2.4.so gnu ld (gnu binutils) 2.29.1 ld: warning: cannot find entry symbol _start; not setting start address /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_palloc' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `wingetpartitionlocalmemory' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `directfunctioncall3coll' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `numeric_int4' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `datumgetfloat8' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `examine_variable' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pg_do_encoding_conversion' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `getcurrenttransactionid' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `per_multifunccall' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `float8getdatum' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `errhint' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `errfinish' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `datumcopy' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_modifytuple' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_typlenbyvalalign' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `deconstruct_array' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_attnum' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `wingetfuncarginpartition' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_fnumber' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `makemdarrayresult' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `directfunctioncall1coll' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pg_atoi' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_guc_variables' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `heap_freetuple' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `init_multifunccall' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_call_result_type' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `palloc' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `memorycontextdelete' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `errmsg' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `wingetfuncargcurrent' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pg_detoast_datum_slice' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `accumarrayresult' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `memorycontextcreate' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `hash_search' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `tupledescgetattinmetadata' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `processinterrupts' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pg_qsort' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_finish' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `list_nth' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `textout' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `releasesyscache' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_exec' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `wingetcurrentposition' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `directfunctioncall2coll' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `directfunctioncall4coll' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_gettype' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_connect' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `errstart' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_getbinval' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `end_multifunccall' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `regclassin' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `repalloc' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `wingetpartitionrowcount' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `blesstupledesc' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `currentmemorycontext' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `aggcheckcallcontext' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_tuptable' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `directfunctioncall5coll' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_fn_expr_argtype' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_attstatsslot' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `array_iterate' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pg_detoast_datum' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pg_detoast_datum_copy' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `default_statistics_target' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `hash_create' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `array_create_iterator' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_getvalue' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `heaptupleheadergetdatum' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `getdatabaseencoding' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `getnumconfigoptions' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `my_exec_path' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `heap_form_tuple' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `construct_array' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `arraygetnitems' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pfree' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `searchsyscache' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `elog_start' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_share_path' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `hash_any' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_typbyval' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `errcode' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `memorycontextalloc' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `palloc0' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_typlen' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `array_free_iterator' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `get_rel_name' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `buildtuplefromcstrings' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `relationnamegettupledesc' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `spi_processed' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `errmsg_internal' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `vacuum_delay_point' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pqsignal' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `free_attstatsslot' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `definecustomstringvariable' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `elog_finish' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `pstrdup' /usr/lib/postgresql/postgis-2.4.so: undefined reference to `interruptpending'
回答: 実際、私はarch linuxでpostgis拡張機能をビルドしました。問題はありません。 ソースをダウンロードしてください http://postgis.net/source/ どこかで開梱 ./autogen.sh then ./configure then makeを実行します これはあまり速くないマシンで私に10分かかりました次に、postgrestインストールフォルダ/usr/lib/postgresqlに移動し、そこに/postgis-2.4.1/postgis/postgis-2.4.soとpostgis-2.4.1/raster/rt_pg/rtpostgis-2.4.soの2つのファイルをコピーします。それで全部です。これで、エラーなしでcreate extension postgis;を実行できます