gpt4 book ai didi

linux - apt-get 安装 mongodb-10gen 失败

转载 作者:太空宇宙 更新时间:2023-11-04 03:55:50 24 4
gpt4 key购买 nike

我想在 Debian 上安装 mongoDB。问题是当我尝试这样做时,输出如下:

Reading package lists... Done
Building dependency tree
Reading state information... Done
mongodb-10gen is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up mongodb-10gen (2.4.10) ...
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)

我对此进行了搜索并找到了一些解决方案,例如:
install mongodb-10gen failed with apt-get
但是当尝试运行此命令时:

apt-get remove mongodb-clients

结果是:

[root@Takhalof-srv ~]$ 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 4 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.10) ...
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 service mongodb restart

结果是:

mongodb: unrecognized service

当我使用 apt-get -f install 时,结果是:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 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.10) ...
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)

我真的很困惑,不知道问题出在哪里。我该怎么办?

最佳答案

第一个命令中的错误强烈表明未安装 MongoDB 服务器(/daemon)。尝试安装mongodb-server,然后执行apt-get -f install来完成配置任何已安装的软件包。

关于linux - apt-get 安装 mongodb-10gen 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24697784/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com