无法卸载 mongodb-org-server

无法卸载 mongodb-org-server

问题

我正在尝试彻底摆脱 mongodb-org-server,但这相当具有挑战性。无论我做什么,我总是会遇到相同的错误:

(Reading database ... 74764 files and directories currently installed.)
Removing mongodb-org-server (3.4.1) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing package mongodb-org-server (--remove):
 subprocess installed pre-removal script returned error exit status 100
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 100
Removing libc-ares2:amd64 (1.10.0-2ubuntu0.1) ...
Removing libv8-3.14.5 (3.14.5.8-5ubuntu2) ...
Removing mongodb-org-mongos (3.4.1) ...
Removing mongodb-org-shell (3.4.1) ...
Removing mongodb-org-tools (3.4.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

研究

为了解决这个问题,我尝试了另一种解决方案:

但无济于事。

问题

有什么解决办法吗?目前我正在考虑一个完整的格式...

答案1

尝试查找文件var/lib/dpkg/info/mongodb-org-server.prerm并注释/删除一行

invoke-rc.d mongod stop || exit $?

其中放置了 stop 命令。然后再次尝试摆脱 mongodb-org-server。

相关内容