I am facing a problem while installing mongodb 7.0 on ubuntu server 22.04.3.
I was following the documentation below.
But when I update the apt, I get a 404 error.
:~$ sudo apt update
Ign:1 https://repo.mongodb.com/apt/ubuntu jammy/mongodb-org/7.0 InRelease
Err:2 https://repo.mongodb.com/apt/ubuntu jammy/mongodb-org/7.0 Release
404 Not Found [IP: 22.214.171.124 443]
Hit:3 http://kr.archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 http://kr.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://kr.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:6 http://kr.archive.ubuntu.com/ubuntu jammy-security InRelease
Reading package lists... Done
E: The repository 'https://repo.mongodb.com/apt/ubuntu jammy/mongodb-org/7.0 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.
What should I do?
I figure out that it is a mistaken from the install document.
In STEP-2: Create a list file for MongoDB
the command provided is wrong:
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.com/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
which should be
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
the domain should be
mongodb.org instead of
It is because the instruction at official website Create a list file for MongoDB - Ubuntu 22.04 (Jammy) providing wrong source package URL. Use wusisu_N_A’s suggestion instead
I tried this command but it still generated the same error at line 8.
I am not sure why at line 7 the link became .com again instead of .org that I entered.
check files in sources.list.d if there is a
search it by this command
grep -r 'mongodb.com' /etc/apt/sources.list.d/
This answer might help you. what is the function of /etc/apt/sources.list.d?
You need to fix domain name in the documentation on page https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
repo.mongodb.com, but needs
Thank you so much for this solution @wusisu_N_A Worked for me on Ubuntu 22.04.3 LTS
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.