1

Why doesn't sudo know where psql is?

view story
linux-howto

http://serverfault.com – The problem The CKAN installation documentation shows you how to list the installed PostgreSQL databases. The command looks like this: sudo -u postgres psql -l When I try that in my shell, I get an error: $ sudo -u postgres psql -l sudo: psql: command not found The workaround Daniel2d2art on the CentOS forum worked around the problem by fully qualifying the path to psql. My psql lives in the directory /usr/pgsql-9.2/bin, so my workaround now looks like this: sudo -u postgres /usr/pgsql-9.2/bin/psql -l When I try that in my shell, it works: $ sudo -u postgres /usr/pgsql-9.2/bin/ps (HowTos)