como instalar o novo pacote quando algum pacote está quebrado?

1

Meu sistema operacional é debian7.8. Eu descobri que há um pacote quebrado. Como posso removê-lo completamente e instalar um novo pacote?

# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following packages will be REMOVED:
  dovecot-imapd dovecot-pop3d
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 5,385 kB of archives.
After this operation, 23.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrors.digitalocean.com/debian/ wheezy/main vim-runtime all 2:7.3.547-7 [4,607 kB]
Get:2 http://mirrors.digitalocean.com/debian/ wheezy/main vim i386 2:7.3.547-7 [778 kB]
Fetched 5,385 kB in 0s (5,884 kB/s)
(Reading database ... 50590 files and directories currently installed.)
Removing dovecot-imapd ...
[....] Starting IMAP/POP3 mail server: dovecotFatal: service(imap) access(/usr/lib/dovecot/imap) failed: No such file or directory
 failed!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing dovecot-imapd (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing dovecot-pop3d ...
[....] Starting IMAP/POP3 mail server: dovecotFatal: service(imap) access(/usr/lib/dovecot/imap) failed: No such file or directory
 failed!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing dovecot-pop3d (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 dovecot-imapd
 dovecot-pop3d
E: Sub-process /usr/bin/dpkg returned an error code (1)

Como esse problema pode ser corrigido para que eu possa instalar o pacote vim ?

apt-get  remove  -f  dovecot  

It has no effct at all.

t@born:~# apt-get  remove  -f  dovecot
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'dovecot' is not installed, so not removed
The following packages will be REMOVED:
  dovecot-imapd dovecot-pop3d
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 958 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 50529 files and directories currently installed.)
Removing dovecot-imapd ...
[....] Starting IMAP/POP3 mail server: dovecotFatal: service(auth) User doesn't exist: postfix (See service auth { unix_listener /var/spool/postfix/private/auth { user } } setting)
 failed!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing dovecot-imapd (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing dovecot-pop3d ...
[....] Starting IMAP/POP3 mail server: dovecotFatal: service(auth) User doesn't exist: postfix (See service auth { unix_listener /var/spool/postfix/private/auth { user } } setting)
 failed!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing dovecot-pop3d (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 dovecot-imapd
 dovecot-pop3d
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por it_is_a_literature 23.02.2015 / 04:46

1 resposta

1

A remoção quer iniciar dovecot por algum motivo, e isso falha devido a um erro de configuração (usuário postfix é referenciado, mas aparentemente esse usuário não existe).

Se o dovecot não estiver sendo executado e você simplesmente quiser removê-lo, sugiro, neste caso, adicionar uma linha a /etc/init.d/dovecot , logo abaixo da primeira #! /bin/sh line:

exit 0

Dessa forma, o script não fará nada, mas sairá com sucesso. A remoção deve então funcionar.

    
por 23.02.2015 / 09:34

Tags