не удалось удалить postgres-xc

При попытке настроить мою среду rails на использование postgresql я ошибочно установил postgres-xc.

Однако при установке произошла ошибка, поэтому при попытке удалить пакет я получаю следующую ошибку:

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)  

Поиск в Google показывает, что некоторые решения указывают на редактирование файла /var/lib/dpkg/info/postgres-xc.prerm для включения exit 0 но это не работает. Кроме того, обратите внимание, что он даже не распознает этот файл.

0
задан 15 November 2013 в 11:41

1 ответ

Откройте файл с помощью команды

sudo nano /var/lib/dpkg/status

, затем удалите сломанный пакет postgres-xc и весь блок информации о нем и сохраните файл.

затем сделать

apt-get install -f

apt-get update

0
ответ дан 15 November 2013 в 11:41

Другие вопросы по тегам:

Похожие вопросы: