linux - MongoDB 错误 : mongodb-10gen E: Sub-process/usr/bin/dpkg returned an error code (1)

标签 linux mongodb

我正在尝试在 Linux(Crunchbang Linux - Debian 的衍生版本)中安装东西,但我遇到了指向 mongodb-20gen 的错误。

当我尝试使用 :-

删除它时
cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-10gen

我明白了......

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)

我在这里读到一些关于 MongoDB 的类似错误,它建议删除 mongo-clients,所以,我尝试了:-

cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-clients

并得到:-

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)

最佳答案

这是一个很难摆脱的状态。如果您创建一个伪造的初始化脚本,您应该能够完成删除:

sudo touch /etc/init.d/mongodb
sudo chmod 755 /etc/init.d/mongodb

关于linux - MongoDB 错误 : mongodb-10gen E: Sub-process/usr/bin/dpkg returned an error code (1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18727408/

相关文章:

node.js - mongodb的if条件查询

c++ - Qt Creator 在 linux mint 64 位中找不到 CMAKE_CXX_COMPILER 编译器

regex - 压缩 awk/sed 管道命令

regex - find -regex 不适用于 {} 说明符

mongodb - 使用 SetSort 时,Mongo Go 驱动程序出现接口(interface)转换错误

C# + MongoDB - 不使用 MongoDB 数据类型/属性的 ObjectId

linux - Ceres make 失败 : "Makefile:138: recipe for target ' all' failed"

linux - bash 脚本与 SSH 控制台不同

mongodb - HBase cassandra couchdb mongodb ..有什么根本区别吗?

javascript - 使用 body-parser 和 express 解析嵌套的 JSON