|
From: Oscar B. <os...@el...> - 2001-10-30 19:06:53
|
Mmmmm......
perl testdbi.pl (yourscript) says:
install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (@INC
contains: /usr/local/lib/perl5/5.6.1/i686-linux
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .)
at (eval 1) line 3.
Perhaps the DBD::Pg perl module hasn't been fully installed,
or perhaps the capitalisation of 'Pg' isn't right.
Available drivers: ExampleP, Proxy.
at testdbi.pl line 3
But:
locate Pg.pm says:
/home/oscar/tmp/Pg.pm
/root/.cpan/build/DBD-Pg-1.01/Pg.pm
/root/.cpan/build/DBD-Pg-1.01/blib/lib/DBD/Pg.pm
/root/.cpan/build/pgsql_perl5-1.9.0/Pg.pm
/root/.cpan/build/pgsql_perl5-1.9.0/blib/lib/Pg.pm
/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD/Pg.pm
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Pg.pm
/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD-Pg-0.95/Pg.pm
/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD-Pg-0.95/blib/lib/DBD/Pg.pm
/usr/include/pgsql/Pg.pm
and perl -v says:
This is perl, v5.6.1 built for i686-linux
Then:
[root@euro oscar]# cd /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD/
[root@euro DBD]# ls
ADO.pm ExampleP.pm Multiplex.pm NullP.pm Pg.pm Proxy.pm Sponge.pm
[root@euro DBD]# cd ../../..
[root@euro site_perl]# ls
5.6.0/ 5.6.1/ i386-linux/
[root@euro site_perl]# cd 5.6.1
[root@euro 5.6.1]# ls
Authen/ Bundle/ Convert/ LWP/ Net/ OLE/ Parse/ Spreadsheet/
Text/ Tie/ i386-linux/
[root@euro 5.6.1]# cd i386-linux/
[root@euro i386-linux]# ls
FCGI.pm auto/
So the DBD directory does not exist in perl 5.6.1
I guess I had to 'un-rpm' or something the older version of perl before
installing the newer.
How can I fix this? I just copy the missing directory?
Oops! I've just tried that! That didn't help.
Any suggestions?
Thanks,
Oscar
Thomas Good wrote:
> On Tue, 30 Oct 2001, Oscar Buijten wrote:
>
>
>>HI Thomas,
>>
>
> Hey Oscar,
>
>
>>I have tried to re_install DBD several times and in several ways. It is
>>there. So that doesn't seem to be the issue.
>>
>
> Did you build DBI and DBD from the src tarball?
>
> You see I'm wondering if you didn't install (via rpm) a mismatched version.
> I dunno if Redhat is up to 5.6.1 * or * if Lamar Owen used it when he
> built the postgresql rpms. If memory serves you said that this all
> started when you moved to 5.6.1 so Dieter could be right that simply
> building DBI and DBD from source could fix it. This is relatively
> painless.
>
> If you have a simple script, say:
> ---------------------------------- cut here -----------------------------
> #!/usr/bin/perl
> use DBI;
> $dbh = DBI->connect("dbi:Pg:dbname=template1", '', '') || die "$DBI::errstr";
> $query = "select current_time";
> $sth = $dbh->prepare($query);
> $sth->execute || die "$DBI::errstr";
> $time = $sth->fetchrow_array;
> $sth->finish;
> $dbh->disconnect;
> print "\nThe time is: $time\n";
> ---------------------------------- and here -----------------------------
>
> and you run it...it should prove interesting to see if perl complains
> about DBI. If this works, then we need to dig deeper.
>
>
>>I want to go for an Pg upgrade now.
>>How do I know which rpm's are installed?
>>
>
> rpm -qa | grep postgresql
>
>
>>Does it matter anyway? Can I just guess them as per your script?
>>How am I sure all is gone?
>>
>
> Right. Edit my script to match what you installed or make your own:
> rpm -qa | grep postgresql > remove.sh
> NOTE: you have to remove the server (base package) last or you
> will get dependency complaints from redhat. Or use
> rpm -e --nodeps postgresql-whatever
>
>
>>Will I get hassle with environment variables? Anything else?
>>
>
> No. This won't change. Redhat dumps everything in
> /usr/lib or /usr/include/pgsql.
>
>
>>But my basic question is really: why doesn't sql-ledger work and why do
>>all the other dbase web apps???
>>
>
> Well, for whatever reason, DBI and DBD-Pg sometimes seem to give people
> headaches. Maybe your other apps don't use perl? Or they don't use
> DBI. A version mismatch could be the culprit. I think Dieter is right
> that you want to find out why perl is unhappy...
> Once we get this fixed, then do an upgrade. If necessary you leave
> out the postgresql-perl package and build the DBI drivers from source.
>
> So, let's see if the above mentioned 'hello world' script produces
> an error.
>
>
>>Thanks so far!
>>
>
> Glad to be of service. ;-)
>
> --------------------------------------------------------------------
> Saint Vincent Catholic Medical Centers
> --------------------------------------------------------------------
> Thomas Good tomg@ { admin | q8 } .nrnet.org
> Programmer/Analyst Phone: 718-818-5528
> Behavioral Health Services Fax: 718-818-5056
> Residential Services Mobile: 917-282-7359
> --------------------------------------------------------------------
> /* Rekordmeister ist nur der FC Bayern München! */
> --------------------------------------------------------------------
>
>
--
_____________________________________________________________
Oscar Buijten
Tel: +33.4.67.57.97.45
Fax: +33.4.67.57.97.46
GSM: +33.6.20.84.15.22
Email: os...@el...
Web: www.elbie.com
|