首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >卸载postgres-xc失败

卸载postgres-xc失败
EN

Ask Ubuntu用户
提问于 2013-11-15 07:18:34
回答 1查看 1.9K关注 0票数 0

在尝试设置rails环境以使用postgresql时,我错误地安装了postgres-xc

但是,在安装过程中发生了错误,因此,当我试图删除包时,会得到以下错误:

代码语言:javascript
复制
The following packages will be REMOVED:  

  postgres-xc   
   0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.  
1 not fully installed or removed.  
After this operation, 17.2 MB disk space will be freed.  
Do you want to continue [Y/n]? y  
(Reading database ... 269015 files and directories currently installed.)  
Removing postgres-xc ...  
dpkg (subprocess): unable to execute installed pre-removal script  (/var/lib/dpkg/info/postgres-xc.prerm): No such file or directory  
dpkg: error processing postgres-xc (--remove):  
 subprocess installed pre-removal script returned error exit status 2  
 * Starting Postgres-XC datanode                                                                                                                                                   pg_ctl: another server might be running; trying to start server anyway  
pg_ctl: another server might be running; trying to start server anyway  
                                                                                                                                                                            [ OK ]
 * Starting Postgres-XC coordinator                                                                                                                                                  pg_ctl: another server might be running; trying to start server anyway  
                                                                                                                                                                          [ OK ]  
 * Starting Postgres-XC gtm                                                                                                                                                      gtm_ctl: another server might be running; trying to start server anyway  
gtm_ctl: could not start server  
Examine the log output.  
invoke-rc.d: initscript postgres-xc, action "start" failed.  
dpkg: error while cleaning up:  
 subprocess installed post-installation script returned error exit status 1  
Errors were encountered while processing:  
 postgres-xc  
E: Sub-process /usr/bin/dpkg returned an error code (1)  

谷歌展示了一些解决方案,比如编辑/var/lib/dpkg/info/postgres-xc.prerm文件以包含exit 0,但这是行不通的。另外,请注意,它甚至不识别该文件。

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2013-11-15 07:30:15

使用命令打开文件

sudo nano /var/lib/dpkg/status

然后删除已损坏的包postgres-xc和有关它的整个信息块并保存该文件。

那就去做

apt-get install -f

apt-get update

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/377329

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档