Troubleshooting¶
On this page
MongoDB Atlas
Errors when retrieving the public key¶
During Import the public key used by the package management system
step of the Install MongoDB Community Edition procedure, you may
encounter a "gpg: no valid OpenPGP data found."
error.
Ensure you are copying the command exactly as documented. The operation
should respond with OK
.
To check that the MongoDB public GPG key exists on your system, run the following command in the terminal:
The output should include an entry that resembles the following:
Errors when running sudo apt update
¶
You may encounter one or more errors that resemble the following
when running sudo apt-get update
as part of the
Install MongoDB Community Edition procedure:
These errors indicate that the MongoDB Public GPG key was not added in step Import the public key used by the package management system of the Install MongoDB Community Edition procedure.
Repeating the Import the public key used by the package management system step of the Install MongoDB Community Edition procedure typically resolves this issue. Ensure you are copying the command and key exactly as documented.
You can validate that the MongoDB public GPG key exists on your system by running the following command in the terminal:
The output should include an entry that resembles the following:
Errors when running sudo apt install -y mongodb-org
¶
You may encounter an error that resembles the following when running
sudo apt install -y mongodb-org
in step Create a list file for MongoDB of the
Install MongoDB Community Edition procedure:
This error indicates that the
/etc/apt/sources.list.d/mongodb-org-4.4.list
may be configured incorrectly or is missing.
To review the contents of the mongodb-org-4.4.list
file,
run the following command in the terminal or shell:
If the file contents do not exactly match the documentation for your Ubuntu version in the step linked above, remove the file and repeat the Create a list file for MongoDB step. If the file does not exist, create it as part of that step.
Once you have validated that the mongodb-org-4.4.list
file exists and has the correct contents, run
sudo apt update
to update the apt
repositories and
retry sudo apt install -y mongodb-org
.
Unable to install package due to dpkg-deb: error
¶
You may encounter an error that resembles the following when
installing the mongodb-org
package:
This error indicates that the system already had the Ubuntu
mongodb
package installed prior to installing the official
MongoDB Inc. mongodb-org
packages. To confirm wheter the
host has the Ubuntu mongodb
package installed, run the
following command in a terminal or shell:
If your output resembles the following, you must uninstall
the Ubuntu mongodb
package before retrying the
Install MongoDB Community Edition procedure:
Run the following commands in a terminal or shell to fully remove the
Ubuntu mongodb
package before retrying the installation
procedure:
Note
sudo apt purge mongodb
removes any default configuration files
installed by the Ubuntu mongodb
package. If you have
modified these configuration files and want to keep those
modifications, copy the files to another directory such as
/home/your-user-name
.
If your output includes a mix of mongodb-org
and
mongodb
binaries, you may need to first apt remove
, apt
purge
, and apt autoremove
the mongodb-org
package
before attempting to remove and purge the Ubuntu mongodb
package. After clearing all MongoDB-related packages, retry the
installation procedure.