Unix Technical Forum

Postgres connection error

This is a discussion on Postgres connection error within the Pgsql General forums, part of the PostgreSQL category; --> Greetings, I keep getting the following error when attempting to establish a connection (from Perl): install_driver(Pg) failed: DBD::Pg object ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:22 AM
Vernon Van Zandt
 
Posts: n/a
Default Postgres connection error

Greetings,

I keep getting the following error when attempting to establish a
connection (from Perl):

install_driver(Pg) failed: DBD::Pg object version undef does not match
bootstrap parameter 2.2.2 at /usr/lib/perl/5.8/DynaLoader.pm line 245.

Here's the body of code used to connect:
sub db_connect {
my $dbname = shift;
my $host = shift;
my $user = shift;
my $pass = shift;
my %db_attr = (
PrintError => 0,
RaiseError => 0,
);

my $dsn = "DBI:Pg:dbname=$dbname;host=$host"; my $db =
DBI->connect($dsn, $user, $pass, \%db_attr) or die "Can't connect() to
database $dbname: +$DBI::errstr";
return ($db);
}

Am I in error here, or ...? We're running Debian Linux (etch, I think...).

TIA, -Vern


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:22 AM
Douglas McNaught
 
Posts: n/a
Default Re: Postgres connection error

On 3/18/08, Vernon Van Zandt <vernon.vanzandt@orionnetworksolutions.com> wrote:
> Greetings,
>
> I keep getting the following error when attempting to establish a
> connection (from Perl):
>
> install_driver(Pg) failed: DBD::Pg object version undef does not match
> bootstrap parameter 2.2.2 at /usr/lib/perl/5.8/DynaLoader.pm line 245.


That would seem to indicate something went wrong with your DBD::Pg
install. Did you compile it yourself or install it as a Debian
package?

-Doug

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:06 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com