This AskUbuntu post resolveu o problema para mim; Eu editei /var/lib/dpkg/status
e removi a seção que estava causando problemas.
Estou tentando instalar coisas no Linux (Crunchbang Linux - uma derivação do Debian), e estou recebendo erros que apontam para o mongodb-20gen.
Quando tento removê-lo usando: -
cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-10gen
Eu recebo ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mongodb-10gen
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 221 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 81657 files and directories currently installed.)
Removing mongodb-10gen ...
arg: remove
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--remove):
subprocess installed pre-removal script returned error exit status 100
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
Eu li algo aqui para erros semelhantes com o MongoDB, e sugeriu remover mongo-clientes, então, eu tentei: -
cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-clients
e obtenha: -
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mongodb-clients' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mongodb-10gen (2.4.6) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
seguindo o conselho de schaiba, eu tentei: -
cometbill@Linuxn00b:~$ sudo apt-get install -f
e obtivemos: -
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mongodb-10gen (2.4.6) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
This AskUbuntu post resolveu o problema para mim; Eu editei /var/lib/dpkg/status
e removi a seção que estava causando problemas.
Como a mensagem de erro reclama de /etc/init.d/mongodb
não existente, tente criar esse arquivo. Isso provavelmente é o suficiente para fazer progresso neste caso.
Em geral, quando um script de instalação ou remoção falha, consulte /var/lib/dpkg/info/$PACKAGE.{preinst,postinst,prerm,postrm}
. Se for um script de shell, adicione set -x
abaixo da linha #!
para imprimir um rastreamento. Edite o script, se necessário, para corrigir o erro e, em seguida, execute apt-get -f install
.
Tags apt dpkg debian crunchbang