1. Error: “sh:psql command not found”
2. How to Solve
After investigation, it is because the postgres installation directory is under /home/, and the zabbix user monitoring causes insufficient permissions. Note: Do not try to modify the permissions with: chmod,chown, that is useless, I have tested it
3. solution:
Put the postgres installation directory in a directory other than /home, usually it can be put in the /usr/local directory, and then authorize the soft connection and it is OK, the data storage directory is not required. mv /home/postgres/postgres-13 /usr/local/ ln -s //usr/local/postgres-13/bin/psql /bin/psql The rest of the environment variables can be modified by yourself, so I won't explain them.
Similar Posts:
- How to Solve Error: FATAL: role “root” does not exist
- [How to Solve] psql: FATAL: role “postgres” does not exist
- [Solved] PSQL: fatal: the database system is starting up
- PostgreSQL Connect Error: FATAL: no pg_hba.conf entry for host
- [Solved] createdb: could not connect to database postgres: FATAL: Peer authentication failed for user “postgres”
- [Solved] Psql reports “invalid command \N” error when restoring data
- [Solved] Postgres Error: template1 is being accessed by other users
- error: permission denied to create database [How to Solve]
- Postgres invalid command data recovery processing
- An error prompt appears during the installation of win10 PostgreSQL: “failed to load SQL modules into the database cluster”