From: Ekaterina Amez <ekaterina.amez@zunibal.com>
To: pgsql-admin@lists.postgresql.org
Subject: Should I care about this error "failed to link /usr/bin/psql [...] exists and it is not a symlink"?
Date: Tue, 3 Dec 2019 15:41:21 +0100
Message-ID: <516a1fbf-2323-4278-86f0-e7e4886f73e5@zunibal.com> (raw)
Hi all,
I'm installing postgres 9.6 in a CentOS 7 computer that already has
postgres v9.2 installed (version that comes with CentOS installer) and
I've seen the message of this mail's subject. It's the second machine
where I see it, but previous one was a development server and I passed
over it. But now I'm trying to make a guide to take this procedure to a
Production server. I understand what this error is telling me, what I'm
missing is if this has or can have any side effects.
The full installation log is (sorry for the parts in Spanish but I guess
is more or less legible, if translation needed please ask):
*[root@test-replicas ~]#* yum install postgresql96-server
[....]
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Instalando : postgresql96-libs-9.6.16-2PGDG.rhel7.x86_64 1/3
Instalando : postgresql96-9.6.16-2PGDG.rhel7.x86_64 2/3
failed to link /usr/bin/psql -> /etc/alternatives/pgsql-psql: /usr/bin/psql exists and it is not a symlink
failed to link /usr/bin/clusterdb -> /etc/alternatives/pgsql-clusterdb: /usr/bin/clusterdb exists and it is not a symlink
failed to link /usr/bin/createdb -> /etc/alternatives/pgsql-createdb: /usr/bin/createdb exists and it is not a symlink
failed to link /usr/bin/createlang -> /etc/alternatives/pgsql-createlang: /usr/bin/createlang exists and it is not a symlink
failed to link /usr/bin/createuser -> /etc/alternatives/pgsql-createuser: /usr/bin/createuser exists and it is not a symlink
failed to link /usr/bin/dropdb -> /etc/alternatives/pgsql-dropdb: /usr/bin/dropdb exists and it is not a symlink
failed to link /usr/bin/droplang -> /etc/alternatives/pgsql-droplang: /usr/bin/droplang exists and it is not a symlink
failed to link /usr/bin/dropuser -> /etc/alternatives/pgsql-dropuser: /usr/bin/dropuser exists and it is not a symlink
failed to link /usr/bin/pg_basebackup -> /etc/alternatives/pgsql-pg_basebackup: /usr/bin/pg_basebackup exists and it is not a symlink
failed to link /usr/bin/pg_dump -> /etc/alternatives/pgsql-pg_dump: /usr/bin/pg_dump exists and it is not a symlink
failed to link /usr/bin/pg_dumpall -> /etc/alternatives/pgsql-pg_dumpall: /usr/bin/pg_dumpall exists and it is not a symlink
failed to link /usr/bin/pg_restore -> /etc/alternatives/pgsql-pg_restore: /usr/bin/pg_restore exists and it is not a symlink
failed to link /usr/bin/reindexdb -> /etc/alternatives/pgsql-reindexdb: /usr/bin/reindexdb exists and it is not a symlink
failed to link /usr/bin/vacuumdb -> /etc/alternatives/pgsql-vacuumdb: /usr/bin/vacuumdb exists and it is not a symlink
Instalando : postgresql96-server-9.6.16-2PGDG.rhel7.x86_64 3/3
Comprobando : postgresql96-libs-9.6.16-2PGDG.rhel7.x86_64 1/3
Comprobando : postgresql96-server-9.6.16-2PGDG.rhel7.x86_64 2/3
Comprobando : postgresql96-9.6.16-2PGDG.rhel7.x86_64 3/3
Instalado:
postgresql96-server.x86_64 0:9.6.16-2PGDG.rhel7
Dependencia(s) instalada(s):
postgresql96.x86_64 0:9.6.16-2PGDG.rhel7 postgresql96-libs.x86_64 0:9.6.16-2PGDG.rhel7
¡Listo!
*[root@test-replicas ~]#* ls -l /usr/bin/psql /etc/alternatives/pgsql-psql
lrwxrwxrwx. 1 root root 23 dic 3 12:37/etc/alternatives/pgsql-psql ->/usr/pgsql-9.6/bin/psql
-rwxr-xr-x. 1 root root 449280 nov 6 2016/usr/bin/psql
I've searched this error, but the only thing I've found is something
about alternatives system, and the command update-alternatives. But I
don't fully understand this system (I'm used to Windows) and this means
that when using the command I'm not sure about what I'm doing, and I
can't go to a Production environment like this. An alternative to this
could be copy all these files to another location and replace them with
links to the copies. But this solution looks a bit ugly (don't know how
to express better :D).
Should I go the easy way (copy files and replace original ones with
links), is better the first option (update-alternatives) or is there
another solution?
Thank you for your time,
Ekaterina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ekaterina.amez@zunibal.com, pgsql-admin@lists.postgresql.org
Subject: Re: Should I care about this error "failed to link /usr/bin/psql [...] exists and it is not a symlink"?
In-Reply-To: <516a1fbf-2323-4278-86f0-e7e4886f73e5@zunibal.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox