Thread: : Unable to load libsqlpg.so

: Unable to load libsqlpg.so

From
Carlos Ojea Castro
Date:
Hello:

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
postgresql database.

Anyone knows how can I make my connection work again?

Thank you,
Carlos



Re: : Unable to load libsqlpg.so

From
Carlos Ojea Castro
Date:
Carlos Ojea Castro wrote:

>
> Hello:
>
> 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
> 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
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

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.
Any ideas for Debian Sarge, kernel 2.6.8-1?

Thanks,
Carlos


Re: : Unable to load libsqlpg.so

From
Oliver Elphick
Date:
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.

> > 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.

> 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?

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.

> 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.

> 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.

--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "Lo, children are an heritage of the LORD; and the
      fruit of the womb is his reward."        Psalms 127:3


Re: : Unable to load libsqlpg.so

From
Carlos Ojea Castro
Date:
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!




Re: : Unable to load libsqlpg.so

From
"Uwe C. Schroeder"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


There is no version of this library linked to a newer postgres version.
Symlinking libpq.so.3 to libpq.so.2 doesn't work with 7.4 anymore - at least
not here on my mandrake box.
I found no way to get this working except for compiling a libpq from a
postgres 7.2.x version - not what you want to do.
However: kylix comes with an odbc driver. I just set up my unixodbc and told
all my reports to use odbc -> works quite fine.
So maybe until borland comes up with a newer version of libsqlpg.so you'd have
to resort to odbc.

Hope that helps

UC


On Wednesday 03 November 2004 08:18 am, Carlos Ojea Castro wrote:
> 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!
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

- --
    UC

- --
Open Source Solutions 4U, LLC    2570 Fleetwood Drive
Phone:  +1 650 872 2425        San Bruno, CA 94066
Cell:   +1 650 302 2405        United States
Fax:    +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFBiRoljqGXBvRToM4RApjOAJ0XF8qJOCggaKWuTwf3HofWOixrKgCdGsUN
NNCjnXeC+uaCoI0Pn/vKwfY=
=u2cd
-----END PGP SIGNATURE-----