Score:0

Error while installing PostgreSQL 14.2 onto kUbuntu 20.04

cn flag

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:

  1. https://www.postgresql.org/download/linux/ubuntu/
  2. https://dev.to/monicag/install-postgresql-onto-ubuntu-multipass-vm-511p
  3. https://itnixpro.com/install-postgresql-on-ubuntu/
  4. 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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.