(pygenie) root@zijinliushui-dekt:/www# sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease
Hit:5 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release [2989 B]
Hit:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 Release
Get:10 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release.gpg [801 B]
Ign:10 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release.gpg
Hit:11 http://security.ubuntu.com/ubuntu jammy-security InRelease
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/4.4/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/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.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release: The following signatures were invalid: EXPKEYSIG 68818C72E52529D4 MongoDB 4.0 Release Signing Key <packaging@mongodb.com>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release' is not signed.
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi,
It is important that you first import the public GPG key for the latest stable version of MongoDB by running the following command. If you intend to use a version of MongoDB other than 4.4, be sure to change
4.4
in the URL portion of this command to align with the version you want to install:In the above example, cURL prints the content of the GPG key file and then pipes it into the following
sudo apt-key add -
command, thereby adding the GPG key to your list of trusted keys.You can follow all of those steps here:
If this still does not work, feel free to share more information about your exact setup, for example, what OS you are using, whether you follow any tutorials, etc.
An alternative option here is to also consider using a Managed MongoDB cluster instead of managing your own instance:
That way you will not have to worry about managing your own instance and will get many benefits out of the box like:
- Bobby