Can't install mongodb for ubuntu
Asked Answered
J

3

5

Trying to install mongodb for ubuntu and can't solve the issue. I got lost, need your help please!

Going according the docs: 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 -

Result (CLI output): on mine ubuntu:

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

Result (CLI output):

deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse
  1. sudo apt-get update

Result (CLI output):

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

Result (CLI output):

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

Result (CLI output):

x86_64

lsb_release -a

Result (CLI output):

No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 22.04 LTS

Release:    22.04

Codename:   jammy 
Javanese answered 16/7, 2022 at 5:48 Comment(0)
E
9

Good evening, I was having the same problem which was basically the lack of libssl1.1

What I did to solve it was to add the repository that contains this lib to download, in this case I used the focal repository.

Use this command in your terminal to add it to your system:

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

Then do an update:

sudo apt-get update

And finally install the library:

sudo apt install libssl1.1

After installed try to install mongodb again, if it worked I'm glad to have helped you, if the problem persists I don't know how I can help you :(

Erectile answered 28/7, 2022 at 2:12 Comment(2)
.. it is working!! TXRecent
I have the same error. Your approach didn't work for meBeldam
S
1

This is happening in Ubuntu 20.04 recently as gpg keys not getting loaded properly.

Import the public key

curl -fsSL https://pgp.mongodb.com/server-7.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
   --dearmor

Create list file where mongodb-server-7.0.gpg file location is added by signed-by

echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt-get update

I hope it works for you !

Sprat answered 20/8, 2023 at 6:11 Comment(0)
V
0

https://www.youtube.com/watch?v=TzJ8xppcxM4

I'm trying from lajunta channel, with a little bit modification.

sudo apt-key export 64C3C388 | sudo gpg.d --dearmour -o /etc/apt/keyrings/mongod.gpg

you must find keyrings directory, my keyrings is in apt, maybe not the same with you and in the video.

then change directory to :

cd /etc/apt/sources.list.d

and next, follow installation documentation on the website.

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/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

Hope this help...

Vital answered 8/3, 2023 at 10:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.