首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法为ubuntu安装mongodb

无法为ubuntu安装mongodb
EN

Stack Overflow用户
提问于 2022-07-16 05:48:36
回答 1查看 2K关注 0票数 0

试图为ubuntu安装mongodb,但无法解决这个问题。我迷路了,需要你帮忙!

按文档执行:https://www.mongodb.com/docs/master/tutorial/install-mongodb-on-ubuntu/

  1. wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -

结果(CLI输出):在矿:

代码语言:javascript
运行
复制
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK

  1. 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

结果(CLI输出):

代码语言:javascript
运行
复制
deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse

  1. sudo apt-get update

结果(CLI输出):

代码语言:javascript
运行
复制
et:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Ign:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 InRelease                           
Hit:3 http://packages.microsoft.com/repos/code stable InRelease                                     
Hit:4 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu jammy InRelease                  
Hit:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release                             
Ign:6 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 InRelease                           
Hit:7 http://il.archive.ubuntu.com/ubuntu jammy InRelease                                           
Ign:8 https://ppa.launchpadcontent.net/upubuntu-com/xampp/ubuntu jammy InRelease 
Hit:9 http://il.archive.ubuntu.com/ubuntu jammy-updates InRelease   
Hit:11 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 Release                            
Hit:12 http://il.archive.ubuntu.com/ubuntu jammy-backports InRelease                                
Err:13 https://ppa.launchpadcontent.net/upubuntu-com/xampp/ubuntu jammy Release  
  404  Not Found [IP: 185.125.190.52 443]
Reading package lists... Done
W: http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/4.0/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: The repository 'https://ppa.launchpadcontent.net/upubuntu-com/xampp/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/6.0/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

  1. sudo apt-get install -y mongodb-org

结果(CLI输出):

代码语言:javascript
运行
复制
Reading package lists... Done
Building dependency tree... Done
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-mongos : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
 mongodb-org-server : Depends: libcurl3 (>= 7.16.2) but it is not installable
                      Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
 mongodb-org-shell : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
 mongodb-org-tools : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
E: Unable to correct problems, you have held broken packages.

uname -m

结果(CLI输出):

代码语言:javascript
运行
复制
x86_64

lsb_release -a

结果(CLI输出):

代码语言:javascript
运行
复制
No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 22.04 LTS

Release:    22.04

Codename:   jammy 
EN

回答 1

Stack Overflow用户

发布于 2022-07-28 02:12:19

晚上好,我也有同样的问题,那就是缺少libssl1.1

我为解决这个问题所做的就是添加包含这个库的存储库来下载,在本例中,我使用了焦点存储库

在终端中使用此命令将其添加到系统中:

echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list

然后进行更新:

sudo apt-get update

最后安装库:

sudo apt install libssl1.1

安装后再试着安装mongodb,如果它成功了,我很高兴能帮助您,如果问题仍然存在,我不知道如何帮助您:

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73001840

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档