Re: Cant get Perl Module loaded
От | John |
---|---|
Тема | Re: Cant get Perl Module loaded |
Дата | |
Msg-id | _xZO6.2381$xM2.1092372@typhoon2.ba-dsg.net обсуждение исходный текст |
Ответ на | Re: Cant get Perl Module loaded (Neil Conway <nconway@klamath.dyndns.org>) |
Ответы |
Re: Re: Cant get Perl Module loaded
(Neil Conway <nconway@klamath.dyndns.org>)
|
Список | pgsql-general |
Yes I posted a bunch of stuff way to hastily and was not clear. I ran perl -e 'use DBD::Pg' and got this: perl -e 'use DBD::Pg' Can't locate DBD/Pg.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i586-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i586-linux /usr/lib/perl5/site_perl/5.005 .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. I did a find as follows: joro@natascha:/usr/lib/perl5 > find . -name "Pg.pm" -print ./site_perl/5.005/i586-linux/Pg.pm so the Pg.pm file is in the scripts search path and yet....!? Anyway to make the original post more complete, I was running a cgi script as follows: #!/usr/bin/perl use Pg; use DBI; use CGI qw/:standard/; $q = new CGI; print $q->header; my($dbh)=""; my($datasource)="dbi:Pg:infoman"; $dbh=DBI->connect($datasource) or die "Can't connect\n"; $sth = $dbh->prepare("SELECT Name from Platform"); $sth->execute(); @PLATOPTS=$sth->fetchrow_array(); . . . #After doing some HTML I now try to create the a drop down print "<p align=\"left\">Platform Selected<select size=\"1\" name=\"PlatID\" multiple>\n"; foreach $appoption (@PLATOPTS){ print "<option>$platoption</option>\n"; } Then finish the HTML ...etc. I get this output: install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i586-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i586-linux /usr/lib/perl5/site_perl/5.005 .) at (eval 5) line 3. Perhaps the DBD::Pg perl module hasn't been fully installed, or perhaps the capitalisation of 'Pg' isn't right. Available drivers: ADO, ExampleP, Multiplex, Proxy. at /usr/local/apache/cgi-bin/vuladd.cgi line 23 I am not sure if I was supposed to compile perl into the posgresql or postgresql into my perl. Anyway I went to the src directory and followed the instructions for make install in the postgresql/src/interfaces/perl5 directory and everything seems fine. the permissions are: joro@natascha:/usr/lib/perl5/site_perl/5.005/i586-linux > ls -l Pg.pm -r--r--r-- 1 root root 18124 May 23 21:32 Pg.pm If this is not enough information please tell me what else to post. Thanks for helping me as I am struggling. -John "Neil Conway" <nconway@klamath.dyndns.org> wrote in message news:20010522182623.A348@klamath.dyndns.org... > On Sun, May 20, 2001 at 12:48:48PM +0000, John wrote: > > I have installed perl and postgres, followed the instructions on how to > > install the perl modules and tried to run a simple cgi script to connect to > > postgress, get some data and display it. > > > > I keep getting a message in the error log that says perl can't find the > > DBM:Pg module or maybe I misspelled it. I also tried to "include" Pg.pm and > > it says it cant find the module. I did a manual find and it is there. > > Spelling things correctly (like DBD::Pg) and including the full error > messages would be helpful. Also, there's a difference between Pg and > DBD::Pg. > > 1) What output does this produce: > > perl -e 'use DBI; print join("\n", DBI->available_drivers), "\n"' > > 2) Do you get an error when you execute: > > perl -e 'use DBD::Pg' > > 3) What steps did you follow to install DBD::Pg? > > Cheers, > > Neil > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html
В списке pgsql-general по дате отправления:
Следующее
От: nirajkp@yahoo.com (Niraj K. Patel)Дата:
Сообщение: PostgreSQL 7.03 Install fails on RedHat Linux 6.1