From: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | "B(dot)V(dot)Dean" <B(dot)V(dot)Dean(at)ukc(dot)ac(dot)uk>, Lamar Owen <lamar(dot)owen(at)wgcr(dot)org> |
Cc: | Postgres Hackers List <hackers(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL Perl Module |
Date: | 1999-10-20 13:10:03 |
Message-ID: | 380DBF2B.6D1DC13C@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I have downloaded and installed your packaged RPM for the Pg.pm module for
> PostgreSQL 6.5.1 on RedHat 6.0 i386 linux and cannot be found by perl.
> Is my problem unique? When I run a perl script with 'use Pg;' in it I get:
> Can't locate Pg.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at ../src/Perl/pg.pl line 1.
> BEGIN failed--compilation aborted at ../src/Perl/pg.pl line 1.
> The Pg.pm has been installed into:
> /usr/lib/perl5/site_perl
I haven't had the chance to use much perl in the last year or two, but
it may be that the default @INC does not include the directories we
used for the installation. Also, the RPMs were generated on a RH5.2
system, which may have a slightly different configuration.
On my RH5.2 system, I have the following INC paths:
> perl -e 'foreach $i (@INC) { printf "$i\n" }'
/usr/lib/perl5/i386-linux/5.00405
/usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux
/usr/lib/perl5/site_perl
.
And the RPM puts files in:
[root(at)golem i386]# rpm -qlp postgresql-perl-6.5.1-2.i386.rpm
/usr/lib/perl5/man/man3/Pg.3
/usr/lib/perl5/site_perl/Pg.pm
/usr/lib/perl5/site_perl/auto/Pg
/usr/lib/perl5/site_perl/auto/Pg/autosplit.ix
/usr/lib/perl5/site_perl/i386-linux/auto
/usr/lib/perl5/site_perl/i386-linux/auto/Pg
/usr/lib/perl5/site_perl/i386-linux/auto/Pg/Pg.bs
/usr/lib/perl5/site_perl/i386-linux/auto/Pg/Pg.so
which seems to be consistant. One thing you can try is to add
/usr/lib/perl5/site_perl to INC at the top of your program and see if
that helps. Try:
unshift(@INC, "/usr/lib/perl5/site_perl");
...
One of the problems with generating RPMs is that unless you have more
than one machine you can't *really* test how they behave, but need
others to try them out.
btw, it would probably be better to focus on new RPMs posted on
ftp://postgresql.org/pub/RPMS/ (and elsewhere), generated by Lamar
Owens who has taken over the RPM development and maintenance. These
include RPMs generated specifically for RH6.0, but Lamar had just put
out a request for someone to test the RH6.1-generated RPMs on a RH6.0
machine to see if they are compatible. If you have time, I'm sure he
would appreciate trying that out.
Good luck.
- Thomas
--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 1999-10-20 13:45:48 | Re: [HACKERS] Readline use in trouble? |
Previous Message | Thomas Lockhart | 1999-10-20 12:51:14 | Re: [HACKERS] Creating operators |