View previous topic :: View next topic |
Author |
Message |
sensi_tuX n00b
Joined: 18 Dec 2004 Posts: 46
|
Posted: Mon Jul 17, 2017 7:42 am Post subject: Can't set postgresql 9.6.3 with postgresql-config |
|
|
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 |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
Posted: Mon Jul 17, 2017 11:07 am Post subject: |
|
|
Code: | ldd `which pgadmin3` |
libpq.so.5 should be
Code: | /usr/lib/postgresql-9.6/lib/libpq.so.5 |
Try
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30905 Location: here
|
Posted: Mon Jul 17, 2017 12:27 pm Post subject: |
|
|
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 |
|
|
bookwood Tux's lil' helper
Joined: 06 Oct 2005 Posts: 123 Location: Dortmund
|
Posted: Wed Jul 19, 2017 8:25 am Post subject: |
|
|
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 |
|
|
bookwood Tux's lil' helper
Joined: 06 Oct 2005 Posts: 123 Location: Dortmund
|
Posted: Wed Jul 19, 2017 9:32 am Post subject: |
|
|
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 |
|
|
mimosinnet l33t
Joined: 10 Aug 2006 Posts: 713 Location: Barcelona, Spain
|
Posted: Wed Jul 26, 2017 7:30 am Post subject: |
|
|
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 |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
Posted: Wed Jul 26, 2017 7:15 pm Post subject: |
|
|
Sounds like a bug to me. Did not have this problem going from 9.5 to 9.6. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Jul 27, 2017 10:40 pm Post subject: |
|
|
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 |
|
|
foontala n00b
Joined: 21 Jul 2005 Posts: 5
|
Posted: Mon Feb 19, 2018 4:51 pm Post subject: |
|
|
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 |
|
|
|