i tried to install and get in run PostgreSQL 14.2 onto kUbuntu Version 20.04.
using instructions from several pages and it ends always with the same error.
i tried as described here:
- https://www.postgresql.org/download/linux/ubuntu/
- https://dev.to/monicag/install-postgresql-onto-ubuntu-multipass-vm-511p
- https://itnixpro.com/install-postgresql-on-ubuntu/
- https://techviewleo.com/how-to-install-postgresql-database-on-ubuntu/
example 2.
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get -y install postgresql
sudo su - postgres
psql
before each installation try i cleaned the system like so:
sudo apt-get remove '^postgresql.*'
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
sudo rm -r /usr/lib/postgresql/
sudo rm -r /var/lib/pgsql/data
sudo rm -r /var/lib/postgresql/
sudo rm -r /etc/postgresql
sudo rm -r /var/run/postgresql/
sudo rm -r /var/log/postgresql/
reboot
the error always happens if i try this:
su - postgres
psql
and sends this message:
# psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
# Is the server running locally and accepting connections on that socket?
After reading https://dba.stackexchange.com/questions/182189/how-do-i-access-postgres-when-i-get-an-error-about-var-run-postgresql-s-pgsql
i tried
unix_socket_directories = '/tmp/'
that not changed my error.
i heard that people switched to fedora because of some problems. i hope its possible to solve this without switching the Linux distribution.