Thanks Josue for your reply.
Unfortunately it didn’t work.
I don’t remember having did anything with postgresql but when I tried your solution, it gave the following:
root@thibaut:~# sudo apt install postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
postgresql-doc
The following NEW packages will be installed:
postgresql
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/55.8 kB of archives.
After this operation, 61.4 kB of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LC_COLLATE = "C",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LC_COLLATE = "C",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package postgresql.
(Reading database ... 59199 files and directories currently installed.)
Preparing to unpack .../postgresql_9.6+181+deb9u2_all.deb ...
Unpacking postgresql (9.6+181+deb9u2) ...
Setting up postgresql (9.6+181+deb9u2) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
In case, I tried again to install Synapse afterward but same problem.
root@thibaut:~# systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor
Active: active (exited) since Wed 2018-11-07 19:17:03 UTC; 2h 16min ago
Main PID: 281 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/postgresql.service
Nov 07 19:17:02 thibaut.fr.to systemd[1]: Starting PostgreSQL RDBMS...
Nov 07 19:17:03 thibaut.fr.to systemd[1]: Started PostgreSQL RDBMS.
lines 1-8/8 (END)
.
root@thibaut:~# sudo -u postgres psql
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
could not change directory to "/root": Permission denied
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
root@thibaut:~# tail -n 100 /var/log/postgresql/postgresql-9.6-main.log
tail: cannot open ‘/var/log/postgresql/postgresql-9.6-main.log’ for reading: No such file or directory
It looks like /var/log/postgresql/ is empty.
When I am inside, ls doesn’t find me anything.
Sorry for the delay of my answer, I was abroad without my PC.
I tried this solution but the problem remains the same.
One point, I got this which is quite odd (I guess):
root@thibaut:~# rm -r /etc/postgresql/
rm: cannot remove '/etc/postgresql/': No such file or directory
root@thibaut:~# rm -r /etc/postgresql-common/
rm: cannot remove '/etc/postgresql-common/': No such file or directory
root@thibaut:~# rm -r /var/lib/postgresql/
rm: cannot remove '/var/lib/postgresql/': No such file or directory
root@thibaut:~# userdel -r postgres
userdel: postgres mail spool (/var/mail/postgres) not found
userdel: postgres home directory (/var/lib/postgresql) not found
root@thibaut:~# groupdel postgres
groupdel: group 'postgres' does not exist
I don’t have any log of postgresql.
The ones I tried preivously show the same thing as what I copied above in this post.
Is there anything else than /var/log/postgresql that I can inspect?