Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3675  / 2 Years ago, thu, april 28, 2022, 11:03:15

I have trouble installing postgresql with apt.



postgresql-9.1 (or postgresql-9.3) installation fails with:



* Starting PostgreSQL 9.1 database server
* Error: could not exec /usr/lib/postgresql/9.1/bin/pg_ctl /usr/lib/postgresql/9.1/bin/pg_ctl start -D /var/lib/postgresql/9.1/main -l /var/log/postgresql/postgresql-9.1-main.log -s -o -c config_file="/etc/postgresql/9.1/main/postgresql.conf" :
[fail]
invoke-rc.d: initscript postgresql, action "start" failed.


When I try executing /usr/lib/postgresql/9.1/bin/pg_ctl /usr/lib/postgresql/9.1/bin/pg_ctl start -D /var/lib/postgresql/9.1/main -l /var/log/postgresql/postgresql-9.1-main.log -s -o -c config_file="/etc/postgresql/9.1/main/postgresql.conf"directly, it fails with:



/usr/lib/postgresql/9.1/bin/pg_ctl: symbol lookup error: /usr/lib/postgresql/9.1/bin/pg_ctl: undefined symbol: PQping


Here is my system information:



$ uname -a
Linux daclin 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


Would you have any idea on what is going on?


More From » apt

 Answers
5

OK, I finally found the issue. There was a conflict with libpq.so. It was actually installed twice.



Running ldconfig -v | grep libpq showed:



libpq.so.5 -> libpq.so.5.1
libpq.so.5 -> libpq.so.5.6


I removed the first one and it works like a charm now. The issue was really specific to my setup but it might be helpful anyway...


[#27934] Friday, April 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pheter

Total Points: 223
Total Questions: 111
Total Answers: 119

Location: Guadeloupe
Member since Sat, Aug 22, 2020
4 Years ago
pheter questions
Mon, Jun 21, 21, 07:35, 3 Years ago
Tue, Jul 5, 22, 22:50, 2 Years ago
Sat, Nov 27, 21, 17:50, 2 Years ago
;