无法卸载 mongodb,Debian 6.0

无法卸载 mongodb,Debian 6.0

当我运行 sudo apt-get purge mongodb-org* 时,我得到了这个:

me@myserver:/var/lib$ sudo apt-get purge mongodb-org*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mongodb-org' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-shell' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-server' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-mongos' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-tools' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-mongos' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-server' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-shell' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-tools' for regex 'mongodb-org*'
Package mongodb-org-unstable is not installed, so not removed
Package mongodb-org-unstable-mongos is not installed, so not removed
Package mongodb-org-unstable-server is not installed, so not removed
Package mongodb-org-unstable-shell is not installed, so not removed
Package mongodb-org-unstable-tools is not installed, so not removed
The following packages will be REMOVED:
  mongodb-org* mongodb-org-mongos* mongodb-org-server* mongodb-org-shell* mongodb-org-tools*
0 upgraded, 0 newly installed, 5 to remove and 86 not upgraded.
1 not fully installed or removed.
After this operation, 292 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 44327 files and directories currently installed.)
Removing mongodb-org ...
arg: remove
Purging configuration files for mongodb-org ...
dpkg: warning: while removing mongodb-org, directory '/var/lib/mongodb' not empty so not removed.
Removing mongodb-org-server ...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing mongodb-org-server (--purge):
 subprocess installed pre-removal script returned error exit status 100
configured to not write apport reports
                                      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 mongodb-org-mongos ...
Removing mongodb-org-shell ...
Removing mongodb-org-tools ...
Processing triggers for man-db ...
Errors were encountered while processing:
 mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

什么可能出错?

答案1

看起来像是一个有缺陷的 postrm 脚本,试图操作已经被删除的东西。

该脚本应位于 /var/lib/dpkg/info/mongodb-org-server.postrm 。您可以编辑或删除它。

相关内容