PostgreSQL 8.3を入れているマシンにDBD::Pg 2.19.3をインストールしようとしたらエラー255で失敗した。
# cpanm DBD::Pg --> Working on DBD::Pg Fetching http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-2.19.3.tar.gz ... OK Configuring DBD-Pg-2.19.3 ... OK Building and testing DBD-Pg-2.19.3 ... FAIL! Installing DBD::Pg failed. See /root/.cpanm/work/XXXX.xxxx/build.log for details. Retry with --force to force install it. # # cat /root/.cpanm/work/XXXX.xxxx/build.log cpanm (App::cpanminus) 1.6922 on perl 5.008008 built for x86_64-linux-thread-multi Work directory is /root/.cpanm/work/XXXX.xxxx You have make /usr/bin/make You have /usr/bin/wget You have /bin/tar: tar (GNU tar) 1.15.1 You have /usr/bin/unzip Searching DBD::Pg on cpanmetadb ... --> Working on DBD::Pg Fetching http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-2.19.3.tar.gz -> OK Unpacking DBD-Pg-2.19.3.tar.gz Entering DBD-Pg-2.19.3 Checking configure dependencies from META.yml Checking if you have version 0 ... Yes (0.9902) Checking if you have DBI 1.52 ... Yes (1.52) Configuring DBD-Pg-2.19.3 Running Makefile.PL Configuring DBD::Pg 2.19.3 PostgreSQL version: 80304 (default port: 5432) # Failed test 'use DBD::Pg;' # at t/00basic.t line 14. # Tried to use 'DBD::Pg'. # Error: Can't load '/root/.cpanm/work/XXXX.xxxx/DBD-Pg-2.19.3/blib/arch/auto/DBD/Pg/Pg.so' for module DBD::Pg: /root/.cpanm/work/XXXX.xxxx/DBD-Pg-2.19.3/blib/arch/auto/DBD/Pg/Pg.so: undefined symbol: lo_import_with_oid at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230. # at (eval 7) line 2 # Compilation failed in require at (eval 7) line 2. # BEGIN failed--compilation aborted at (eval 7) line 2. Bailout called. Further testing stopped: Cannot continue without DBD::Pg FAILED--Further testing stopped: Cannot continue without DBD::Pg make: *** [test_dynamic] エラー 255 -> FAIL Installing DBD::Pg failed. See /root/.cpanm/work/XXXX.xxxx/build.log for details. Retry with --force to force install it. #
undefined symbolと出ているlo_import_with_oidは
PostgreSQL 8.4以上で、8.3にはないのが原因とのこと。
Bug #79551 for DBD-Pg: Regression in 2.19.3: undefined symbol: lo_import_with_oid
https://rt.cpan.org/Public/Bug/Display.html?id=79551
リビジョンを1つ下げてDBD::Pg 2.19.2を指定したところインストールできた。
# cpanm http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-2.19.2.tar.gz --> Working on http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-2.19.2.tar.gz Fetching http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-2.19.2.tar.gz ... OK Configuring DBD-Pg-2.19.2 ... OK Building and testing DBD-Pg-2.19.2 ... OK Successfully installed DBD-Pg-2.19.2 1 distribution installed #