Problems installing MongoDB on Ubuntu 20.04

Following the documentation for Mongo 4.4 on Ubuntu, I get the key, add the repository, then get the following error when running atp-get update:

Err:6 focal/mongodb-org/4.4 Release
Could not handshake: The TLS connection was non-properly terminated. [IP: 9480]
Reading package lists... Done
E: The repository ' focal/mongodb-org/4.4 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.

If I try to curl to the page I get the following:

<head><title>404 Not Found</title></head>
<h1>404 Not Found</h1>
<li>Code: NoSuchKey</li>
<li>Message: The specified key does not exist.</li>
<li>Key: apt/ubuntufocal/mongodb-org/4.4multiverse</li>
<li>RequestId: C5JWFBGFTN5X4B10</li>
<li>HostId: RHZGG+Mt6t/Gmo25ZCTy1L5+8NaZiz+NqCuDxYYd8iTyiKjMuUvUKU3Zm+gKbbJd5H5aMzal+fQ=</li>

Am I looking at a key issue or is something not right with the repo?

Please have a look on below link and follow steps for ubuntu 20

I have been following every guide I can find.

Hi @jon_rawlins,

I tried above mongodb link on which worked for me.

1 Like

I am also experiencing this issue trying to install MongoDB 4.4 on Ubuntu 20.04LTS … This mentions no release file for focal when I try apt update (after adding the PGP key of course). @jon_rawlins did you find a workaround for this?

the fix for this to change this line… basically remove 4.4 on the saved file …

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

to this
echo "deb [ arch=amd64,arm64 ] focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org.list

1 Like

Hopefully, this can be helpful for installing MongoDB version 3.4.17
Try this:

echo "deb xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

sudo apt update

apt-cache policy libssl1.0-dev

sudo apt-get install libssl1.0-dev

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

Update, please also run this step of adding repository keys as the first step before running any of the other steps mentioned above:

sudo apt-key adv --keyserver hkp:// --recv 0C49F3730359A14518585931BC711F9BA15703C6

Apologies for the inconvenience!

tried everything but doesnot work

1 Like

@Suman_Osti please update if you find any solution

Hi @salman_musa and welcome to the MongoDB community forums. :wave:

You don’t state what issues you are having so it’s hard for us to help you out. Have followed the installation notes for putting MongoDB on Ubuntu 20.04? Please post any error messages you are getting so that we may help you get things fixed.