2

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

1

1 Answer 1

0

The permissions are wrong on one of your folders in your $PATH

do a

echo $PATH

and look at all your folders mine looks like

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

the folders are seperated by :'s

then cd to every folder and ls -l to see permissions

if the folder is not 755 (drwxr-xr-x) then do a

sudo chmod 755 sbin/

finally when you are sure you havent missed anything run your

sudo apt-get -f install

Hope this helped everyone!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .