安装 postgres-xc 和 postgres-xc-client 后,Postgressql 安装中断。我尝试卸载,但无法卸载。活动日志如下:
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.
尝试添加到 sudo 组但没有帮助。
postgres@ashUbuntu:~$ sudo usermod -a -G sudo postgres
[sudo] password for postgres:
postgres is not in the sudoers file. This incident will be reported.
现在我很困惑,请帮帮我。
@AB 解决方案有效,能够卸载:
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
我假设您的用户帐户不是postgres
。因此,使用以下方式切换到您的帐户
su - your_user_name
并再次开始卸载