Can't remove, purge, unistall mongodb from debian

流过昼夜 提交于 2019-12-03 16:22:00

问题


I'm trying to reinstall it, because it has problems. For example, I can't install Chromium because mongodb-org-server is not configured. But I can't even remove it for the same reason.

apt-get autoremove --purge mongodb

Or:

apt-get purge mongodb

Or:

apt-get remove --purge mongodb

All end in the same way:

 dpkg: error processing package mongodb-org-server (--configure):
  subprocess installed post-installation script returned error exit status 102
 Errors were encountered while processing:
  mongodb-org-server
 E: Sub-process /usr/bin/dpkg returned an error code (1)

Some data about my machine from hostnamectl:

  Operating System: Debian GNU/Linux 8 (jessie)
  Kernel: Linux 3.14-2-amd64
  Architecture: x86_64

How can I fix this?

Updates: things I tried/I'm trying

apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 973 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mongodb-org-server (3.0.2) ...
dpkg: error processing package mongodb-org-server (--configure):
 subprocess installed post-installation script returned error exit status 102
Errors were encountered while processing:
 mongodb-org-server

回答1:


To avoid that sort of problems you should install software only from native Debian repositories. Unfortunately it is not unusual when sloppy/incompetent 3rd party packages are responsible for such troubles.

To recover try removing file /var/lib/dpkg/info/mongodb-org-server.postinst before attempting to apt-get purge mongodb.




回答2:


Remove all mongodb file inside

/var/lib/dpkg/info/mongodb

And then do

sudo apt purge mongodb-org*

Answer credits to: Lazyexpert



来源:https://stackoverflow.com/questions/30691665/cant-remove-purge-unistall-mongodb-from-debian

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!