简体   繁体   English

嗨,我尝试安装但失败了 MongoDB,但出现了问题,我试图修复它,但没有成功

[英]Hi,I tried to install but failed MongoDB, BUT something went worng, i was try to fix it, but it didn't work

Linux MInt 21 , I try to instal MongoDB for like 3 days but apparently I'm not doing something right. Linux 21 分钟,我尝试安装 MongoDB 大约 3 天,但显然我没有做正确的事情。 I would greatly appreciate it if you could tell me what I am doing wrong:)) I post what i did in the terminal, I removed it and install it again but and that went wrong too如果您能告诉我我做错了什么,我将不胜感激 :)) 我在终端中发布了我所做的,我将其删除并重新安装,但也出错了

Lenovo-Y520-15IKBM:~$ sudo apt install mongodb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package mongodb 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' has no installation candidate

Lenovo-Y520-15IKBM:~$ ^C

Lenovo-Y520-15IKBM:~$ sudo apt-get purge mongo*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'mongodb-server' for glob 'mongo*'
Note, selecting 'mongodb-dev' for glob 'mongo*'
Note, selecting 'mongodb' for glob 'mongo*'
Note, selecting 'mongoose' for glob 'mongo*'
Package 'mongodb-dev' is not installed, so not removed
Package 'mongodb' is not installed, so not removed
Package 'mongodb-server' is not installed, so not removed
Package 'mongoose' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.

Lenovo-Y520-15IKBM:~$ sudo apt install mongodb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package mongodb 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' has no installation candidate

Lenovo-Y520-15IKBM:~$ ^C

Lenovo-Y520-15IKBM:~$ sudo apt remove --autoremove mongodb-org
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package mongodb-org
Lenovo-Y520-15IKBM:~$ ^C

Lenovo-Y520-15IKBM:~$ sudo apt install mongodb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package mongodb 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' has no installation candi

A Linux Mint release is always based on a specific Ubuntu version. Linux Mint 版本始终基于特定的 Ubuntu 版本。 When you add the MongoDB repositories, you must make sure to reference the correct Ubuntu version.添加 MongoDB 存储库时,必须确保引用正确的 Ubuntu 版本。 The corresponding variant of Ubuntu is specified in /etc/os-release . /etc/os-release中指定了 Ubuntu 的相应变体。

Here is an example for installing MongoDB-6 in Mint这是在 Mint 中安装 MongoDB-6 的示例

curl -sS https://pgp.mongodb.com/server-6.0.asc | sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/mongodb-org-6.0-keyring.gpg
echo "deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME")/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install mongodb-org
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -

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

sudo apt-get update


sudo apt-get install -y mongodb-org

try these commands and you will have mongodb installed on mint尝试这些命令,您将在 mint 上安装 mongodb

do not forget to start mongodb sudo systemctl start mongod不要忘记启动 mongodb sudo systemctl start mongod

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我无法使用 composer 在 Symfony 中安装某些东西 - I can't install something in Symfony with composer 在mahout上安装mvn不起作用(linux) - mvn install on mahout didn't work (linux) 当我尝试使用“make”安装某些东西时,为什么我的权限被拒绝? - Why do I get permission denied when I try use "make" to install something? 我在 VirtualBox 上的 ParrotOS 一直在运行安装,然后将我带回尝试/安装菜单,我该如何解决这个问题? - My ParrotOS on VirtualBox keeps running the installation then taking me back to the try/install menu, how do I fix this? 当“ gcc”和“ libxml2”出现问题时,如何安装lxml - How to install lxml when something went wrong in “gcc” and “libxml2” logrotate:即使我使用了 -f 选项,每日轮换也不起作用 - logrotate: daily rotation didn't work even though i used -f option 我想在 npm 上安装 mechanic,我尝试运行这条线 sudo npm install -g mechanic,但它给了我错误,我不明白这个错误 - I want to install mechanic on npm, I tried to run this line sudo npm install -g mechanic, but it gives me error, I don't understand this error 尝试使用cpan安装Perl模块时,为什么会出现“找不到404”和“无法更改目录”错误? - Why do I get “404 Not Found” and “Failed to change directory” errors when I try to install a Perl module with cpan? 我尝试安装时,NGINX出现错误 - NGINX is giving error when i try to install 当我尝试安装 go 依赖项时超时 - timeout when I try to install go dependencies
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM