Thread: upgrade issue

upgrade issue

From
Jodi Kanter
Date:
We just upgraded one of our Red Hat 7.3 machines from postgresql version 7.2.3 to version 7.3.2. All seemed to go smoothly until we received an error via our web interface. The following error occurred:

install_driver(Pg) failed: Can't load '/usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.2: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 206, <OR> line 57.
 at (eval 4) line 3
Compilation failed in require at (eval 4) line 3, <OR> line 57.
Perhaps a required shared library or dll isn't installed where expected
 at sessionlib.pl line 1507

The Pg driver is present, and was working before the upgrade. From this error I understand that Pg.so can't load libpq.so.2. No surprise since there is no /usr/lib/libpq.so.2   It appears that a symlink was created to file that does not exist.

We solved the problem by moving libpq.so.2 from another machine. That machine has not been upgraded yet and is still running postgresql version 7.2.3.

I was hoping someone could give me some insight to why this occured. Did we miss some part of the installation?  I still have two machines to upgrade and would like to avoid this on the others. The rpms all appeared to have run without trouble. So, why didn't it install?

Thanks
Jodi

--

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu


 

 

 

Re: upgrade issue

From
Oleg Bartunov
Date:
Read this:

http://fts.postgresql.org/db/msg.html?mid=1361754

Oleg
On Fri, 23 May 2003, Jodi Kanter wrote:

> We just upgraded one of our Red Hat 7.3 machines from postgresql version
> 7.2.3 to version 7.3.2. All seemed to go smoothly until we received an
> error via our web interface. The following error occurred:
>
> install_driver(Pg) failed: Can't load
> '/usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBD/Pg/Pg.so' for module
> DBD::Pg: libpq.so.2: cannot open shared object file: No such file or
> directory at /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 206,
> <OR> line 57.
>  at (eval 4) line 3
> Compilation failed in require at (eval 4) line 3, <OR> line 57.
> Perhaps a required shared library or dll isn't installed where expected
>  at sessionlib.pl line 1507
>
> The Pg driver is present, and was working before the upgrade. From this
> error I understand that Pg.so can't load libpq.so.2. No surprise since
> there is no /usr/lib/libpq.so.2   It appears that a symlink was created
> to file that does not exist.
>
> We solved the problem by moving libpq.so.2 from another machine. That
> machine has not been upgraded yet and is still running postgresql
> version 7.2.3.
>
> I was hoping someone could give me some insight to why this occured. Did
> we miss some part of the installation?  I still have two machines to
> upgrade and would like to avoid this on the others. The rpms all
> appeared to have run without trouble. So, why didn't it install?
>
> Thanks
> Jodi
>
>

    Regards,
        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Re: upgrade issue

From
Jodi Kanter
Date:
Recompiling Perl DBI is not a practical option. Did the developers realize that a major version upgrade to libpq was going to break Perl DBI/DBD-Pg?
Current versions of DBD-Pg use that libpg.so.2.


Oleg Bartunov wrote:
Read this:

http://fts.postgresql.org/db/msg.html?mid=1361754

Oleg
On Fri, 23 May 2003, Jodi Kanter wrote:

We just upgraded one of our Red Hat 7.3 machines from postgresql version
7.2.3 to version 7.3.2. All seemed to go smoothly until we received an
error via our web interface. The following error occurred:

install_driver(Pg) failed: Can't load
'/usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBD/Pg/Pg.so' for module
DBD::Pg: libpq.so.2: cannot open shared object file: No such file or
directory at /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 206,
<OR> line 57.
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3, <OR> line 57.
Perhaps a required shared library or dll isn't installed where expected
at sessionlib.pl line 1507

The Pg driver is present, and was working before the upgrade. From this
error I understand that Pg.so can't load libpq.so.2. No surprise since
there is no /usr/lib/libpq.so.2 It appears that a symlink was created
to file that does not exist.

We sol ved the problem by moving libpq.so.2 from another machine. That
machine has not been upgraded yet and is still running postgresql
version 7.2.3.

I was hoping someone could give me some insight to why this occured. Did
we miss some part of the installation? I still have two machines to
upgrade and would like to avoid this on the others. The rpms all
appeared to have run without trouble. So, why didn't it install?

Thanks
Jodi



Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

--

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu


 

 

 


Re: upgrade issue

From
Joe Conway
Date:
Jodi Kanter wrote:
> We just upgraded one of our Red Hat 7.3 machines from postgresql version
> 7.2.3 to version 7.3.2. All seemed to go smoothly until we received an
> error via our web interface. The following error occurred:
>
> install_driver(Pg) failed: Can't load
> '/usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBD/Pg/Pg.so' for module
> DBD::Pg: libpq.so.2: cannot open shared object file: No such file or
> directory at /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 206,
> <OR> line 57.

There was a libpq binary compatibility change between 7.2.x and 7.3.x,
so libpq.so.2 was changed to libpq.so.3. I don't remember the specifics,
and the archives don't seem searchable at the moment :-(. But in any
case, I think you need to rebuild DBD::Pg against the newer libpq.

> We solved the problem by moving libpq.so.2 from another machine. That
> machine has not been upgraded yet and is still running postgresql
> version 7.2.3.

It would probably be better to create a libpq.so.2 symlink from
libpq.so.3 until you can rebuild DBD::Pg.

> I was hoping someone could give me some insight to why this occured. Did
> we miss some part of the installation?  I still have two machines to
> upgrade and would like to avoid this on the others. The rpms all
> appeared to have run without trouble. So, why didn't it install?

The problem is the new libpq.so version. Not sure why RPM dependencies
didn't warn you though.

HTH,

Joe


Re: upgrade issue

From
"David F. Skoll"
Date:
On Fri, 23 May 2003, Jodi Kanter wrote:

> Recompiling Perl DBI is not a practical option. Did the developers
> realize that a major version upgrade to libpq was going to break Perl
> DBI/DBD-Pg?
> Current versions of DBD-Pg use that libpg.so.2.

I have a customer who symlinked libpg.so.3 to libpg.so.2 and he hasn't
reported problems.

I don't really advocate this, but at the same time, it's a quick fix :-)

--
David.

Re: upgrade issue

From
Joe Conway
Date:
Jodi Kanter wrote:
> Recompiling Perl DBI is not a practical option. Did the developers
> realize that a major version upgrade to libpq was going to break Perl
> DBI/DBD-Pg?
> Current versions of DBD-Pg use that libpg.so.2.

I just created a 7.3 RPM (based on DBD::pg 1.22 from
http://gborg.postgresql.org/project/dbdpg/download/download.php)

You can grab either the 7.3 binary RPM, or a source RPM from here:
   http://www.joeconway.com/

If you want to use the source RPM to build your own binary, do the
following:

rpm -i perl-DBD-Pg-1.22-custom.1.src.rpm
rpm -ba --target i686 /usr/src/redhat/perl-DBD-Pg.spec
rpm -Uvh /usr/src/redhat/RPMS/i686/perl-DBD-Pg-1.22-custom.1.i686.rpm

HTH,

Joe



Re: upgrade issue

From
Tom Lane
Date:
"David F. Skoll" <dfs@roaringpenguin.com> writes:
> I have a customer who symlinked libpg.so.3 to libpg.so.2 and he hasn't
> reported problems.
> I don't really advocate this, but at the same time, it's a quick fix :-)

The binary-level incompatibility only affects clients that use NOTIFY,
so for most applications you should be able to get away with the above.

The real solution of course is not to remove libpg.so.2 when you
upgrade, if you are not upgrading everything that uses it.

            regards, tom lane

Re: upgrade issue

From
Jodi Kanter
Date:
Thanks Joe and to all others that replied to our problem. Looks like we are up and running now!

Joe Conway wrote:
Jodi Kanter wrote:
Recompiling Perl DBI is not a practical option. Did the developers realize that a major version upgrade to libpq was going to break Perl DBI/DBD-Pg?
Current versions of DBD-Pg use that libpg.so.2.

I just created a 7.3 RPM (based on DBD::pg 1.22 from
http://gborg.postgresql.org/project/dbdpg/download/download.php)

You can grab either the 7.3 binary RPM, or a source RPM from here:
  http://www.joeconway.com/

If you want to use the source RPM to build your own binary, do the following:

rpm -i perl-DBD-Pg-1.22-custom.1.src.rpm
rpm -ba --target i686 /usr/src/redhat/perl-DBD-Pg.spec
rpm -Uvh /usr/src/redhat/RPMS/i686/perl-DBD-Pg-1.22-custom.1.i686.rpm

HTH,

Joe



--

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu