[Pleroma] Can't install due to an error in postgresql

My YunoHost server

Hardware: Raspberry Pi at home
YunoHost version: 4.8.0.3
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain:
The installation comes from a backup of a former installation on AMD64, backup working fine until now.

Description of my issue

I am trying to install pleroma (not present in the former installation) but I get this error:

  - 2021-01-02 14:46:25,958: WARNING - It looks like postgresql was not properly configured ? /etc/postgresql/11 is missing ... Could be due to a locale issue, c.f.https://serverfault.com/questions/426989/postgresql-etc-postgresql-doesnt-exist

(full log in https://paste.yunohost.org/raw/woyoniteje)

Searching in this forum I found this thread OnlyOffice ne s'installe pas seeming relevant for my problem but if I try to give the commands explained there I get this error

root@cybervalley:~# pg_createcluster 11 main --start                           
Configuring already existing cluster (configuration: /etc/postgresql/11/main, data: /var/lib/postgresql/11/main, owner: 123:129)
Error: move_conffile: required configuration file /var/lib/postgresql/11/main/postgresql.conf does not exist

and

root@cybervalley:~# pg_lsclusters                                              
Ver Cluster Port Status Owner Data directory Log file

So first let’s try this :

dpkg-reconfigure postgresql-11

I tried but the error on following command remains:

root@cybervalley:~# dpkg-reconfigure postgresql-11
root@cybervalley:~# pg_createcluster 11 main --start
Configuring already existing cluster (configuration: /etc/postgresql/11/main, data: /var/lib/postgresql/11/main, owner: 123:129)
Error: move_conffile: required configuration file /var/lib/postgresql/11/main/postgresql.conf does not exist

zblerg alright, let’s try maybe apt install postgresql-11 --reinstall ?

Nothing changed:

root@cybervalley:~# apt install postgresql-11 --reinstall 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/13.3 MB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 65387 files and directories currently installed.)
Preparing to unpack .../postgresql-11_11.9-0+deb10u1_armhf.deb ...
Unpacking postgresql-11 (11.9-0+deb10u1) over (11.9-0+deb10u1) ...
Setting up postgresql-11 (11.9-0+deb10u1) ...
Processing triggers for postgresql-common (200+deb10u4) ...
supported-versions: WARNING! Unknown distribution: raspbian
debian found in ID_LIKE, treating as Debian
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:

And then the same error:

root@cybervalley:~# pg_createcluster 11 main --start
Configuring already existing cluster (configuration: /etc/postgresql/11/main, data: /var/lib/postgresql/11/main, owner: 123:129)
Error: move_conffile: required configuration file /var/lib/postgresql/11/main/postgresql.conf does not exist

Merf okay, I guess I would try to completely reinstall postgresql-11 then …

apt remove  postgresql-11 --purge

(just here be sure to carefully read what apt tells you and that it ain’t going to remove critical stuff)

then

apt install postgresql-11

I am thinking I have found a bug in raspbian because I purged postgresql-11 (and pleroma-ynh-deps with it) and reinstalled only postgresql-11 and apt asked me to create the cluster with the old command but the error remained

root@cybervalley:~# pg_createcluster 11 main --start                           
Configuring already existing cluster (configuration: /etc/postgresql/11/main, data: /var/lib/postgresql/11/main, owner: 123:129)                               
Error: move_conffile: required configuration file /var/lib/postgresql/11/main/postgresql.conf does not exist

I needed to purge all packages related to postgresql

apt remove --purge postgresql-client-11 postgresql-client-common postgresql-common

and the directory /var/lib/postgresql

Then I installed postgreql-11 and the installation went fine!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.