Recent

Author Topic: Can not load PostgreSQL Client libpq.so  (Read 20984 times)

99Percent

  • Full Member
  • ***
  • Posts: 154
Re: Can not load PostgreSQL Client libpq.so
« Reply #15 on: September 25, 2011, 03:13:31 am »
when you install libpq, you have the library: /usr/lib/libpq.so-XX, and lazarus needs libpq.so, so you have to alternatives
1. make the simbolik link
2. Install libpq-dev to isntall the source and it makes the simbolik link
I rather add the simbolic links than install libpq-dev because the package provided by debian is 8.4 and I am using 9.1 however I tried adding the symlinks to /usr/lib and it doesn't work.

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: Can not load PostgreSQL Client libpq.so
« Reply #16 on: September 25, 2011, 04:03:08 pm »
The debian libpq-dev in sid and testing is version 9.1.0. There does not appear to be a backport for 9.1 yet. Either install the sid/testing package or manually install the 9.1 lib from the postgreSQL download site. The 8.4 lib does not work with 9.0 so it will not work with 9.1 either.

http://www.enterprisedb.com/products-services-training/pgdownload
http://packages.debian.org/wheezy/libpq-dev
http://packages.debian.org/sid/libpq-dev
« Last Edit: September 25, 2011, 04:27:21 pm by goodname »

TurboRascal

  • Hero Member
  • *****
  • Posts: 672
  • "Good sysadmin. Bad programmer."™
Re: Can not load PostgreSQL Client libpq.so
« Reply #17 on: September 26, 2011, 11:27:27 pm »
No matter what versions are available or what the package does, it is wrong to manually install anything on a package-managed linux distro. The correct way is to specify a package which provides the correct service, as described above.

If there is a REALLY good reason to provide another library version than provided by the system, it should NEVER be installed to the main system directory tree, e.g. in /usr/lib, but it could be installed under the /usr/local tree, e.g. in /usr/local/lib. However, this stil poses a danger of a version conflict in a future system upgrade, even if there is no immediate conflict at the install time...
Regards, ArNy the Turbo Rascal
-
"The secret is to give them what they need, not what they want." - Scotty, STTNG:Relics

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: Can not load PostgreSQL Client libpq.so
« Reply #18 on: September 27, 2011, 04:42:40 am »
I agree that the best way is to use an available package. There is now a libpq 9.1 backport package for stable so there is no longer any reason to do a manual install for libpq.
http://packages.debian.org/squeeze-backports/libpq-dev

If a package is available in Debian unstable and not in stable it is usually possible to install the source package and compile for your current stable system.
« Last Edit: September 27, 2011, 05:00:58 am by goodname »

TurboRascal

  • Hero Member
  • *****
  • Posts: 672
  • "Good sysadmin. Bad programmer."™
Re: Can not load PostgreSQL Client libpq.so
« Reply #19 on: September 27, 2011, 10:43:45 am »
BTW why there is a need install a *-dev package at all? For deployment, all it should be necessary would be a runtime libpq package...

And considering versions, libpq 8.x connects normally to 9.x servers. I'd dare to say, if you don't really use anything 9.x specific, you could test how it works with 8.x client and use that as an option for the application. Having dependency on libpq of 9.x or newer will create incompatibility with many distributions which don't have it... And leaving workarounds for the user to do is often a recipe for disastrer ;)
Regards, ArNy the Turbo Rascal
-
"The secret is to give them what they need, not what they want." - Scotty, STTNG:Relics

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: Can not load PostgreSQL Client libpq.so
« Reply #20 on: September 27, 2011, 03:55:50 pm »
The libpq5 package installs the symbolic link below.
/usr/lib/libpq.so.5 -> libpq.so.5.2

The libpq-dev package installs the desired link
/usr/lib/libpq.so -> libpq.so.5.2

Do not know why this is but I'm sure there is a good reason it happens this way.

Considering PostgreSQL 9.1.0 was released on Sept 16th and it is about 10 days later that it is available for the stable distribution. I would say that is a good turnaround time for a prepackaged system. The 9.1.1 bug fix released yesterday is in the unstable distribution today. It will take some days for the package to filter through to testing and backport.