Problem creating pgsql_perl5 module

Started by Jose Manuel Lorenzo Lopezabout 25 years ago1 messagesgeneral
Jump to latest
#1Jose Manuel Lorenzo Lopez
jose-manuel.lorenzo-lopez@conti.de

Hello PG's,

I am trying to use the Perl module for Postgresql, but when I start
a simple example like this:

#!/usr/local/bin/perl -w

use Pg;

$conn = Pg::connectdb("dbname=template1");

die $conn->errorMessage unless PGRES_CONNECTION_OK eq $conn->status;

$result = $conn->exec("select tablename from pg_tables");

die $conn->errorMessage unless PGRES_TUPLES_OK eq $result->resultStatus;

while (@row = $result->fetchrow) {
print @row, "\n";
}

I get the following error message:

Can't load '/usr/local/lib/perl5/site_perl/5.005/aix/auto/Pg/Pg.so' for
module Pg: dlopen:
/usr/local/lib/perl5/site_perl/5.005/aix/auto/Pg/Pg.so: Directory/File
in the Path does not exist
at /usr/local/lib/perl5/5.00503/aix/DynaLoader.pm line 169.

at ./test.pl line 3
BEGIN failed--compilation aborted at ./test.pl line 3.

I guess anything didn't work while installing the module, although 'make
test'
after making the module seems to be okay. I also checked wether the
files
that appears in the error message exist. They exist (of course)! :)

Perl version 5.005_03
postgresql version 7.0.3
pgsql_perl5 version 1.8.0
AIX oslevel 4.3.2.0
make version 3.78.1
gcc version 2.95.2

Thanks a lot for your help!

Jos� Manuel Lorenzo L�pez

--
**********************************************************************
** Jos� Manuel Lorenzo L�pez **
** **
** ICA Informationssysteme Consulting & Anwendungsgesellschaft mbH **
** Dept. SAP Basis R/3 VBue **
** **
** phone: (+49511) 938-2961 **
** fax : (+49511) 938-2270 **
** e-mail to: jose-manuel.lorenzo-lopez@conti.de **
**********************************************************************