| There is another way. And this is what I did. I now regret it. I should
have used the port above. Unfortunately, I didn't look for one first. I was
told about it after I wrote this article. I suggest you use the port and don't do
the following. Don't use the instructions in the rest of this section.
Use the port.
The solution is at the PostgreSQL Guide
webpage. At that site, you'll find information about the Perl 5 interface for
PostgreSQL, DBD::Pg. That's where I found the link to:
http://www.perl.com/CPAN-local/modules/by-module/DBD/
I suggest you go to the above location and search for DBD-Pg-xxx.tar.gz file which is
the latest and greatest. At the time of writing, these were the links for me:
http://www.perl.com/CPAN-local/modules/by-module/DBD/DBD-Pg-0.95.readme
http://www.perl.com/CPAN-local/modules/by-module/DBD/DBD-Pg-0.95.tar.gz
Download those files (I suggest you do it as non-root). Untar
the tar.gz file and have a look at the README file where you'll find the installation
instructions.
- perl Makefile.PL
- make
- make test
- make install
The instructions suggest that you do steps "1. to 3. as normal user, not as root
!".
You will also have to set the following environment variables. This is bash
format:
POSTGRES_INCLUDE=/usr/local/pgsql/include; export POSTGRES_INCLUDE
POSTGRES_LIB=/usr/local/pgsql/lib; export POSTGRES_LIB
Here's what to expect during step 4
# make install Installing
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBD/Pg/Pg.so Installing
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBD/Pg/Pg.bs Files found in
blib/arch --> Installing files in blib/lib into architecture dependend library tree!
Installing /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/DBD/Pg.pm Installing
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/DBD/dbd-pg.pod Installing
/usr/local/lib/perl5/5.00503/man/man3/DBD::Pg.3 Installing
/usr/local/lib/perl5/5.00503/man/man3/DBD::dbd-pg.3 Writing
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBD/Pg/.packlist Appending
installation info to /usr/libdata/perl/5.00503/mach/perllocal.pod
|