Installing DBD::Pg Perl module locally

From: "Envex Developments" <mwagner(at)envex(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Installing DBD::Pg Perl module locally
Date: 2003-08-13 03:51:09
Message-ID: BNEHLFOCHALOOADHNKMPMEAPCAAA.mwagner@envex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hey guys,

I have a need to install the DBD::Pg Perl module on many shared web servers,
which do not have PostgreSQL installed. Then the DBD::Pg module will just
connect to a remote PostgreSQL database, hosted elsewhere. I'm having some
problems doing this.

First off, I modified the Makefile.PL, and added the three following links
just above the check for environment variables:

$ENV{POSTGRES_INCLUDE} = "./include";
$ENV{POSTGRES_LIB} = "./lib";
$ENV{POSTGRES_HOME} = ".";

I then downloads the entire /include/ directory from my server, and the
following files from the /lib/ directory:
libecpg.a
libecpg.so.3.4.1
libpq.a
libpq.so.3.0
plpgsql.so

I'm not 100% sure why I chose those exact lib files. Just looked like the
right ones I guess. Anyway, then I can install the module by running:
perl Makefile.PL PREFIX=/path/to/whatever LIB=/path/to/whatever
make
make test
make install

The module itself seems to install fine. However, when I try to load it
through a Perl script, I receive the following:

----------
Can't load '/home3/globalenet/envex/lib/i386-linux/auto/DBD/Pg/Pg.so' for
module DBD::Pg: libssl.so.2: cannot open shared object file: No such file or
directory at /usr/lib/perl5/5.6.0/i386-linux/DynaLoader.pm line 200.
----------

The Pg.so file does exist, and I CHMODed it to 755, and still got the same
error. Also, I installed the DBD::Pg module locally with less /include and
/lib files. It would then load through a Perl script, but when it tried to
connect to a remote database, I would get an error saying something like,
unable to load function pqConnect, or something like that.

Any help would be greatly appreciated.

Thanks,
Matt

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Creager 2003-08-13 04:06:04 Re: How to prevent vacuum and reindex from deadlocking.
Previous Message Thomas Beutin 2003-08-13 02:38:08 Re: PostGreSQL - Accessing It