Re: : Unable to load libsqlpg.so

From: Carlos Ojea Castro <carlosojea(at)leveltelecom(dot)es>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: : Unable to load libsqlpg.so
Date: 2004-11-03 16:18:21
Message-ID: 418904CD.3010402@leveltelecom.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oliver Elphick wrote:

>On Wed, 2004-11-03 at 12:56 +0100, Carlos Ojea Castro wrote:
>
>
>>>I'm trying to use kylix3 and postgresql 7.4.1.
>>>
>>>My distro was Debian Woody, kernel 2.20.
>>>I make the link /usr/local/pgsql/lib/libpq.so pointing to libpq.so.2.2
>>>and connection with my database get fine.
>>>
>>>But now, using Debian Sarge Testing, kernel 2.4.27 (I tried also with
>>>kernel 2.6.8-1) that link don't make things work anymore, I get the
>>>error 'Unable to load libsqlpg.so' and I cannot connect with my
>>>
>>>
> ^^^^^^^^
>Did you spell that right? Where does that library come from? It sounds
>as if it belongs to some package that calls Pg; it isn't part of Pg
>itself.
>

libsqlpg.so is located at /usr/local/kylix3/bin, and its a link to /usr/local/kylix3/bin/libsqlpg.so.1.0

>>>postgresql database.
>>>
>>>Anyone knows how can I make my connection work again?
>>>
>>>Thank you,
>>>Carlos
>>>
>>>
>>>
>>Finally I get the connection working in Debian Sarge, kernel 2.4.27
>>doing this:
>>1.- Install libpgsql2.7.2.1-2woody6_i386.deb
>>
>>
>
>I presume you mean libpgsql2-7.2.1-2woody6_i386.deb. This is the
>libpq.so.2 library from PostgreSQL 7.2.1, so it is not very suitable for
>7.4. On the other hand, judging by what you write below, you may not
>actually be using it.
>
>

Yes, I mean libpgsql2-7.2.1-2woody6_i386.deb, maybe that installation is
useless.

>>2.- in /usr/local/kylix3/bin make the link: ln -s
>>/usr/local/pgsql/lib/libpq.so libpq.so
>>3.- in /usr/local/pgsql/lib make the link: ln -s libpq.so.2.2 libpq.so
>>
>>
>
>That ought to fail if libpq.so is already there, since you aren't using
>-f, or have you got the names reversed?
>

Well, I did 'rm libpq.so' before making the link :)

>libpq.so is only used for linking into binaries when a program is
>compiled; the linked library loaded by a program at runtime is
>libpq.so.x, where x is the library major version number. You seem to be
>wanting to tell kylix that the libpq.so.2 library is
>at /usr/local/pgsql/lib/libpq.so, and at the same time make that a
>symbolic link to the libpq.so.3 library.
>

At the same time make that a simbolic link to: libpq.so.2.2

>>However, doing that in Debian Sarge, kernel 2.6.8-1 results in an error
>>'Invalid username/password' when I try to connect to the database.
>>
>>
>
>I think I'm not surprised; I don't know if this error is directly caused
>by the library mismatch, but you seem to be going out of your way to
>confuse things! You don't mention running ldconfig, so I'm not even
>sure which library is going to be called; run ldd on your executable and
>see what it says. You might be getting the libpq.so.2 library from the
>libpgsql2 package from 7.2.1 and using it to connect to a 7.4 database;
>or you might be connecting with a library that is masquerading as
>libpq.so.2 but is actually libpq.so.3.
>

ldd c_admin_v380:
libX11.so.6 => /usr/X11R6/lib/libX11.so.6
libpthread.so.0 => /lib/libpthread.so.0
libdl.so.2 => /lib/libdl.so.2
libc.so.6 => /lib/libc.so.6
/lib/ld-linux.so.2 => /lib/ld-linux.so.2

>>Any ideas for Debian Sarge, kernel 2.6.8-1?
>>
>>
>
>The kernel version should have nothing to do with it. Library loading
>is handled by the C library, libc6 and ldd.so.
>
>My first suggestion is to get a version of Kylix that is built for
>PostgreSQL 7.4.
>
You are right. After reading your post, I tried 'ldconfig
/usr/local/pgsql/lib' and the connection with my database works in my
computer with Debian Sarge kernel 2.6.8-1.

Thank you very much!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tk421 2004-11-03 16:34:08 MD5 for PostgreSQL 7.3.4
Previous Message Randall Smith 2004-11-03 15:57:24 Re: oracle synchronization strategy