Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't set postgresql 9.6.3 with postgresql-config
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
sensi_tuX
n00b
n00b


Joined: 18 Dec 2004
Posts: 46

PostPosted: Mon Jul 17, 2017 7:42 am    Post subject: Can't set postgresql 9.6.3 with postgresql-config Reply with quote

Hi there,

i just made a world update and postgresql was updated from 9.5.7 to 9.6.3.
After this my pgadmin3 tool was working anymore. Trying to start it gave

Code:
pgadmin3: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory


After checking postgresql-config and trying to set it to the new version i get:

Code:
localhost ~ # postgresql-config set 9.6
Setting 9.6 as the default...ln: failed to create symbolic link '/usr/include/postgresql/postgresql-9.6': File exists
!!! Error: Unable to create link! postgresql-9.6 -> /usr/include/postgresql
exiting


The installed version:
Code:
localhost ~ # postgresql-config list
Available PostgreSQL Slots
  9.6                       9.6.3



I was already cleaning and re-merging postgresql and doing a revdep-rebuild but nothing helps...

Even going back to 9.5.7 seems to be impossible now. Emerging it gives me:
Code:
...
realpath: /usr/bin/pgbench: No such file or directory
realpath: /usr/bin/pg_archivecleanup: No such file or directory
realpath: /usr/bin/pg_isready: No such file or directory
realpath: /usr/bin/pg_test_timing: No such file or directory
Setting 9.6 as the default...ln: failed to create symbolic link '/usr/include/postgresql/postgresql-9.6': File exists
!!! Error: Unable to create link! postgresql-9.6 -> /usr/include/postgresql
exiting
 * If you need a global psqlrc-file, you can place it in:
 *     /etc/postgresql-9.5/
 *
 * Gentoo specific documentation:
 * https://wiki.gentoo.org/wiki/PostgreSQL
...



Anyone a idea?
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Mon Jul 17, 2017 11:07 am    Post subject: Reply with quote

Code:
ldd `which pgadmin3`

libpq.so.5 should be
Code:
/usr/lib/postgresql-9.6/lib/libpq.so.5

Try
Code:
emerge -1 pgadmin3
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30905
Location: here

PostPosted: Mon Jul 17, 2017 12:27 pm    Post subject: Reply with quote

Preamble: I use postgresql as client (without server use flag), therefore I played with files without worries about break somethings.

I had same problem, for solve this I removed all broken links that command
Code:
postgresql-config set 9.6

return like "File exists", and finally command postgresql-config set 9.6 has worked
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 123
Location: Dortmund

PostPosted: Wed Jul 19, 2017 8:25 am    Post subject: Reply with quote

The same problem:
Code:
 ~ # postgresql-config set 9.6
Setting 9.6 as the default...ln: die symbolische Verknüpfung '/usr/include/postgresql/postgresql-9.6' konnte nicht angelegt werden: Die Datei existiert bereits
!!! Error: Unable to create link! postgresql-9.6 -> /usr/include/postgresql
exiting
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 123
Location: Dortmund

PostPosted: Wed Jul 19, 2017 9:32 am    Post subject: Reply with quote

The eselect problem is fixed by
Code:
rm ./pg_config_manual.h
rm ./libpq-fe.h
rm ./pg_config_ext.h
rm ./postgresql
rm ./libpq
rm ./postgresql-9.6/postgresql-9.6
rm ./postgresql-9.6/postgresql-9.5

emerge dev-db/postgresql

The problem are links from the old installation.
Back to top
View user's profile Send private message
mimosinnet
l33t
l33t


Joined: 10 Aug 2006
Posts: 713
Location: Barcelona, Spain

PostPosted: Wed Jul 26, 2017 7:30 am    Post subject: Reply with quote

bookwood wrote:
The eselect problem is fixed by....


In my case, I had a symbolic link in from previous installs in /usr/lib64:

Code:
mimosin lib64 # ls -lisah postgresql
2359597 0 lrwxrwxrwx 1 root root 20 25 mai 21:13 postgresql -> postgresql-9.3/lib64


Removing the symlink solved the issue.

Thanks for the hints!
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Take care of the community answering unanswered posts.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Wed Jul 26, 2017 7:15 pm    Post subject: Reply with quote

Sounds like a bug to me. Did not have this problem going from 9.5 to 9.6.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jul 27, 2017 10:40 pm    Post subject: Reply with quote

Happened to me too going from 9.6 to 10. Postgres itself runs fine but everything that needed it to compile was failing.

Probably not for the faint of heart, but I brute-forced it by removing all the broken/circular postgres-related symlinks I could find in /usr/include and /usr/share/eselect (app-misc/symlinks is helpful here), ran eselect to reset it again, problems went away.
Back to top
View user's profile Send private message
foontala
n00b
n00b


Joined: 21 Jul 2005
Posts: 5

PostPosted: Mon Feb 19, 2018 4:51 pm    Post subject: Reply with quote

Here's what worked for me:

Code:
rm /usr/include/postgresql
rm /usr/include/libpq-fe.h
rm /usr/include/pg_config_ext.h
rm /usr/include/pg_config_manual.h
rm /usr/include/postgres_ext.h
rm /usr/include/libpq
eselect postgresql set 10
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum