gpt4 book ai didi

linux - Linux下Mongodb 4.0.4安装报错

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

我正在使用 16.04.1-Ubuntu SMP i686 athlon i686 GNU/Linux (LINUX Mint)

我遵循了[官方文档][1],但最终出错了。

使用最新版本的 MongoDB 安装

$ sudo apt-get install -y mongodb-org

错误

Package mongodb-org is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mongodb-org' has no installation candidate

使用特定版本的 Mongodb 安装

$sudo apt-get install -y mongodb-org=4.0.4 mongodb-org-server=4.0.4 mongodb-org-shell=4.0.4 mongodb-org-mongos=4.0.4 mongodb-org-tools=4.0.4

错误

E: Version '4.0.4' for 'mongodb-org' was not found
E: Version '4.0.4' for 'mongodb-org-server' was not found
E: Version '4.0.4' for 'mongodb-org-shell' was not found
E: Version '4.0.4' for 'mongodb-org-mongos' was not found
E: Version '4.0.4' for 'mongodb-org-tools' was not found

注意:上面的安装是在执行完这些代码之后完成的

$sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
$echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
$sudo apt-get update

最佳答案

教程:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

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

sudo service mongod start

关于linux - Linux下Mongodb 4.0.4安装报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53348064/

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