Package Center: failed to install the package
You might incur in such scenario: every single package you try to install form the Package Center won’t install:
I suspected the issue reside around the PostgreSQL database that manages the Package Center but there is no really way to debug such issue.
The logs are really poor and the only proactive documentation I found about this issue just suggested to run:
curl -s https://ftp.synology.com/support_web/Tools/script/pgsql_analyzer.sh | sh -s — -r
and nothing really changed.
Let’s contact the Synology Support
The support was fast and they found out the root cause in matter of hours: the permission on the folder /var/services was set to 666, instead it should be 755. The they just used chmod to correct the permission.
Because the pgsql service is under this folder, if the permission is not correct, the pgsql’s status will also show an error and this is a symptom of the issue.
So if you find yourself in the same situation just use this command to check the folder permission:
stat -c “%a %n” /var/services/
and then change the permission to 755 this way:
chmod 751 /var/services/