gpt4 book ai didi

linux - 在 ubuntu 版本 18.04 LTS 上安装 mongodb 时遇到问题

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:50:30 25 4
gpt4 key购买 nike

<分区>

我最近安装了 Ubuntu 18.04 LTS 版本,并开始学习使用 linux 和终端。我想安装mongodb。我正在按照 this 中的步骤操作网站。

我在终端中运行了以下几行

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

sudo apt-get update

sudo apt-get install -y mongodb-org

在我运行第四行后出现以下内容

tasif@Tasif-Dell:/$ sudo apt-get install -y mongodb-org
[sudo] password for tasif:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-server but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.

然后当我想启动 mongodb 时会显示以下消息

tasif@Tasif-Dell:/$ sudo service mongod start
[sudo] password for tasif:
Failed to start mongod.service: Unit mongod.service not found.

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