2

Postgressql installation was broken once I installed postgres-xc and postgres-xc-client. I tried uninstalling but not able to do it. The log of activities follows:

postgres@ashUbuntu:~$ sudo apt-get remove --purge postgres-xc-client postgres-xc
[sudo] password for postgres: 
postgres is not in the sudoers file.  This incident will be reported.

Tried to add to sudo group but did not help.

postgres@ashUbuntu:~$ sudo usermod -a -G sudo postgres
[sudo] password for postgres: 
postgres is not in the sudoers file.  This incident will be reported.

Now I am struck, please help.


@A.B. solution worked, able to uninstall:

ashutosh@ashUbuntu:~$ su ashutosh
Password: 
ashutosh@ashUbuntu:~$ dpkg --purge postgres-xc
dpkg: error: requested operation requires superuser privilege
ashutosh@ashUbuntu:~$ sudo dpkg --purge postgres-xc
[sudo] password for ashutosh: 
(Reading database ... 792513 files and directories currently installed.)
Removing postgres-xc (1.1-2ubuntu2) ...
 * Stopping Postgres-XC datanode                                         [ OK ] 
 * Stopping Postgres-XC coordinator                                      [ OK ] 
 * Stopping Postgres-XC gtm                                              [ OK ] 
Purging configuration files for postgres-xc (1.1-2ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
ashutosh@ashUbuntu:~$ sudo dpkg --purge postgres-xc-client
(Reading database ... 792301 files and directories currently installed.)
Removing postgres-xc-client (1.1-2ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
ashutosh@ashUbuntu:~$ 

1 Answers1

1

I assume, you user account isn't postgres. Therefore switch to your account with

su - your_user_name

and start the uninstall again

A.B.
  • 92,125