Обсуждение: Shared object "libpq.so.3" not found

Поиск
Список
Период
Сортировка

Shared object "libpq.so.3" not found

От
marko
Дата:
I'm running FreeBSD 6.2 and I have Postgresql 8.2.4 installed with
Perl v5.8.8.  I'm trying to test DBD-Pg-2.8.7 after compilation and I
get this error after 'make test':

PGINITDB="/usr/local/pgsql/bin/initdb" PERL_DL_NONLAZY=1 /usr/bin/perl
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/
arch')" t/*.t
t/00-signature......skipped
        all skipped: Set the environment variable TEST_SIGNATURE to
enable this test
t/00basic...........ok
1/3
#   Failed test 'use DBD::Pg;'
t/00basic...........NOK 2#   in t/00basic.t at line
14.
#     Tried to use 'DBD::Pg'.
#     Error:  Can't load '/usr/home/markuser/DBD-Pg-2.8.7/blib/arch/
auto/DBD/Pg/Pg.so' for module DBD::Pg: Shared object "libpq.so.3" not
found, required by "Pg.so" at /usr/local/lib/perl5/5.8.8/mach/
DynaLoader.pm line 230.
#  at (eval 8) line 2
# Compilation failed in require at (eval 8) line 2.
# BEGIN failed--compilation aborted at t/00basic.t line 14.
FAILED--Further testing stopped: Cannot continue without DBD::Pg
*** Error code 2

Stop in /usr/home/markuser/DBD-Pg-2.8.7.
-------------------------------------------------------------------------
At first I was getting 'Undefined symbol "PQserverVersion"' error
during 'make test' and it complained about not being able to find
libpq.so.5 I believe.  I fixed that by putting '/usr/local/pgsql/lib'
in ld.so.conf and running ldconfig so that it could find that file.
Then I also included '/usr/local/lib' in that file, which is the path
to libpq.so.3, but its acting like it still can't find it, as you see
above.  It seems that I can't prioritize between searching between
these two directories.  It varies between errors for not finding
libpq.so.5 or libpq.so.3.  I can't seem to provide both library files
at the same time.  Using the LD_LIBRARY_PATH environmental variable
doesn't seem to help this issue either.  I've included both library
directories (separately by a colon, if that's correct) and its no
help.

Now, of course, I've googled this and nothing is helping at this
point.  Does anyone have any other pointers?  Is this a FreeBSD thing
possibly?  I'd *much* appreciate some help here!



Re: Shared object "libpq.so.3" not found

От
Tom Lane
Дата:
marko <marko.online@gmail.com> writes:
> I'm running FreeBSD 6.2 and I have Postgresql 8.2.4 installed with
> Perl v5.8.8.  I'm trying to test DBD-Pg-2.8.7 after compilation and I
> get this error after 'make test':
> #     Error:  Can't load '/usr/home/markuser/DBD-Pg-2.8.7/blib/arch/
> auto/DBD/Pg/Pg.so' for module DBD::Pg: Shared object "libpq.so.3" not
> found, required by "Pg.so" at /usr/local/lib/perl5/5.8.8/mach/
> DynaLoader.pm line 230.

libpq.so.3 corresponds to the libpq version that was shipped in
PG release series 7.3.x and 7.4.x.  8.2 provides libpq.so.5.

Your subsequent comments make it pretty clear that you've got
(at least portions of) both 7.x and 8.x PG installations on your
machine.  I'd suggest flushing all traces of the older one and
then rebuilding DBD::Pg from a clean start.  Somehow it's been
seizing on the older PG installation as the one to link to...

            regards, tom lane

Re: Shared object "libpq.so.3" not found

От
marko
Дата:
On Jul 31, 1:34 am, t...@sss.pgh.pa.us (Tom Lane) wrote:
> marko <marko.onl...@gmail.com> writes:
> > I'm running FreeBSD 6.2 and I have Postgresql 8.2.4 installed with
> > Perl v5.8.8.  I'm trying to test DBD-Pg-2.8.7 after compilation and I
> > get this error after 'make test':
> > #     Error:  Can't load '/usr/home/markuser/DBD-Pg-2.8.7/blib/arch/
> > auto/DBD/Pg/Pg.so' for module DBD::Pg: Shared object "libpq.so.3" not
> > found, required by "Pg.so" at /usr/local/lib/perl5/5.8.8/mach/
> > DynaLoader.pm line 230.
>
> libpq.so.3 corresponds to the libpq version that was shipped in
> PG release series 7.3.x and 7.4.x.  8.2 provides libpq.so.5.
>
> Your subsequent comments make it pretty clear that you've got
> (at least portions of) both 7.x and 8.x PG installations on your
> machine.  I'd suggest flushing all traces of the older one and
> then rebuilding DBD::Pg from a clean start.  Somehow it's been
> seizing on the older PG installation as the one to link to...
>
>                         regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

locate libpq.so returned:
/usr/home/markuser/postgresql-8.2.4/src/interfaces/libpq/libpq.so
/usr/home/markuser/postgresql-8.2.4/src/interfaces/libpq/libpq.so.5
/usr/local/lib/libpq.so
/usr/local/lib/libpq.so.3
/usr/local/pgsql/lib/libpq.so
/usr/local/pgsql/lib/libpq.so.5

I simply deleted /usr/local/lib/libpq.so & /usr/local/lib/libpq.so.3
and now after building DBD::Pg and testing it, I get:
PGINITDB="/usr/local/pgsql/bin/initdb" PERL_DL_NONLAZY=1 /usr/bin/perl
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/
arch')" t/*.t
t/00-signature......skipped
        all skipped: Set the environment variable TEST_SIGNATURE to
enable this test
t/00basic...........ok
1/3
#   Failed test 'use DBD::Pg;'
t/00basic...........NOK 2#   in t/00basic.t at line
14.
#     Tried to use 'DBD::Pg'.
#     Error:  Can't load '/usr/home/markuser/DBD-Pg-2.8.7/blib/arch/
auto/DBD/Pg/Pg.so' for module DBD::Pg: /usr/home/markuser/DBD-Pg-2.8.7/
blib/arch/auto/DBD/Pg/Pg.so: Undefined symbol "BIO_new_mem_buf" at /
usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm line 230.
#  at (eval 8) line 2
# Compilation failed in require at (eval 8) line 2.
# BEGIN failed--compilation aborted at t/00basic.t line 14.
FAILED--Further testing stopped: Cannot continue without DBD::Pg
*** Error code 2
--------------------------------------

Does anyone know which library I'm missing or how I can find that
out?  Googling 'Undefined symbol "BIO_new_mem_buf"' leads to rather
ambiguous results...

Re: Shared object "libpq.so.3" not found

От
marko
Дата:
On Jul 31, 1:34 am, t...@sss.pgh.pa.us (Tom Lane) wrote:
> marko <marko.onl...@gmail.com> writes:
> > I'm running FreeBSD 6.2 and I have Postgresql 8.2.4 installed with
> > Perl v5.8.8.  I'm trying to test DBD-Pg-2.8.7 after compilation and I
> > get this error after 'make test':
> > #     Error:  Can't load '/usr/home/markuser/DBD-Pg-2.8.7/blib/arch/
> > auto/DBD/Pg/Pg.so' for module DBD::Pg: Shared object "libpq.so.3" not
> > found, required by "Pg.so" at /usr/local/lib/perl5/5.8.8/mach/
> > DynaLoader.pm line 230.
>
> libpq.so.3 corresponds to the libpq version that was shipped in
> PG release series 7.3.x and 7.4.x.  8.2 provides libpq.so.5.
>
> Your subsequent comments make it pretty clear that you've got
> (at least portions of) both 7.x and 8.x PG installations on your
> machine.  I'd suggest flushing all traces of the older one and
> then rebuilding DBD::Pg from a clean start.  Somehow it's been
> seizing on the older PG installation as the one to link to...
>
>                         regards, tom lane
>

OK...  I can't say that I remember installing a 7.x PG version.  I
wanted to make sure there wasn't some FreeBSD bug out there relative
to these packages.  Thanks.

Re: Shared object "libpq.so.3" not found

От
"Reko Turja"
Дата:
> locate libpq.so returned:
> /usr/home/markuser/postgresql-8.2.4/src/interfaces/libpq/libpq.so
> /usr/home/markuser/postgresql-8.2.4/src/interfaces/libpq/libpq.so.5
> /usr/local/lib/libpq.so
> /usr/local/lib/libpq.so.3
> /usr/local/pgsql/lib/libpq.so
> /usr/local/pgsql/lib/libpq.so.5

from the location of the source it seems you aren't building from
ports or using the builtin package system. Been using postgres on
FreeBSD and updating from source from 2001 or so without a single
glitch. As FreeBSD has one of the best infrastructures for building
interlinked binaries from source, I seriously suggest using it instead
of trying to reinvent the wheel ;)

-Reko


Re: Shared object "libpq.so.3" not found

От
Tom Lane
Дата:
marko <marko.online@gmail.com> writes:
> #     Error:  Can't load '/usr/home/markuser/DBD-Pg-2.8.7/blib/arch/
> auto/DBD/Pg/Pg.so' for module DBD::Pg: /usr/home/markuser/DBD-Pg-2.8.7/
> blib/arch/auto/DBD/Pg/Pg.so: Undefined symbol "BIO_new_mem_buf" at /
> usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm line 230.

BIO_new_mem_buf is an OpenSSL function, so apparently you've got a
problem with linking to libssl.so.  Not too familiar with how FreeBSD
handles this, but maybe you failed to teach the dynamic linker where
libssl is?

            regards, tom lane