On a new installation of Manjaro ARM XFCE on a raspberry pi I’m trying to install peertube but I get an error:
[user@pi ~]$ sudo systemctl start redis postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xeu postgresql.service" for details.
[user@pi ~]$ systemctl status postgresql.service
× postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-02-15 11:48:06 CET; 19s ago
Process: 7878 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=1/FAILURE)
CPU: 246ms
Feb 15 11:48:06 pi systemd[1]: Starting PostgreSQL database server...
Feb 15 11:48:06 pi postgres[7878]: "/var/lib/postgres/data" is missing or empty. Use a command like
Feb 15 11:48:06 pi postgres[7878]: su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"
Feb 15 11:48:06 pi postgres[7878]: with relevant options, to initialize the database cluster.
Feb 15 11:48:06 pi systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
Feb 15 11:48:06 pi systemd[1]: postgresql.service: Failed with result 'exit-code'.
Feb 15 11:48:06 pi systemd[1]: Failed to start PostgreSQL database server.
[user@pi ~]$ su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"
Password:
su: Authentication failure
[user@pi ~]$ sudo postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise. See the documentation for
more information on how to properly start the server.
Before that, the only thing I did is run this: sudo pacman -S nodejs-lts-fermium yarn ffmpeg postgresql openssl redis git wget unzip python base-devel npm nginx
which gave me this sudo error:
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: unable to load /usr/lib/sudo/sudoers.so: libldap-2.4.so.2: cannot open shared object file: No such file or directory
sudo: fatal error, unable to load plugins
and I fixed it with this solution:
su -
pacman-mirrors -g && pacman -Syyu
exit