My system config is as follows:
System (running on Amazon EC2)
Ubuntu 10.04
Postgresql-8.2 installed and it is working.
ubuntu@ip:~$ sudo /etc/init.d/postgresql-8.2 status:
Running clusters: 8.2/main
When I try to shutdown the server, I get the error:
ubuntu@ip:~$ sudo /etc/init.d/postgresql-8.2 stop
* Stopping PostgreSQL 8.2 database server
* Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/pg_ctlcluster line 63. [fail]
Because of the above problem I am unable to do a clean uninstall of PostgreSQL. Any suggestion on how to fix this problem?
I have tried the following:
sudo apt-get autoremove postgresql-8.2
sudo apt-get -f install
sudo apt-get purge postgresql-*
None of them resolved the problem.
Thanks in advance