MongoDB gpg and repository not working full [Dumb question but needed]
I am trying to install and set up mongodb which you probably already know is difficult as it is. I am running Debian 12 and decided to use it as my main driver whether I like it or not until Debian 13 comes out because I am sick of switching distro's. I ran the following:
Code:
root@mia:/home/noach# sudo apt-get install gnupg 1. **Import the MongoDB public GPG Key:** MongoDB packages are signed with the MongoDB public GPG Key. GPG keys ensure that the packages are authentic and have not been tampered with. You need to import this key. Run the following command: ```bash wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - ``` This command retrieves the MongoDB GPG key and adds it to your apt sources. 2. **Create a list file for MongoDB:** You need to point apt to the official MongoDB repository. Do this by creating a new source list file for MongoDB. Issue the following command: ```bash echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list ``` Here, we're telling apt that we want to use the MongoDB repository. This command creates a new source list file for MongoDB at `/etc/apt/sources.list.d/mongodb-org-4.4.list`. 3. **Reload local package database:** Now you need to reload the local package database to include the MongoDB repository. You do this with the following command: ```bash sudo apt-get update ``` 4. **Install MongoDB:** Now, you can install MongoDB. To do so, run the following command: ```bash sudo apt-get install -y mongodb-org ``` This command installs the latest stable version of MongoDB. If you want to install a specific version, replace `mongodb-org` with `mongodb-org=4.4.10` (or your desired version). 5. **Start MongoDB:** MongoDB doesn't start automatically after it's installed. To start it, use the following command: ```bash sudo systemctl start mongod ``` If you also want MongoDB to start when your system boots, use this command: ```bash sudo systemctl enable mongod ``` 6. **Verify MongoDB is running:** You can verify that MongoDB has started successfully by checking the status: ```bash sudo systemctl status mongod ``` If MongoDB started successfully, the `mongod` status message displays `active (running)`. 7. **Issues that could arise:** - If the MongoDB GPG key does not get imported properly, you will get an error when you try to reload the package database or install MongoDB. Always ensure that the key import command does not return any errors. - If MongoDB does not start, or it fails to enable at boot, check the MongoDB logs for any error messages. The logs are typically located in `/var/log/mongodb/`. - When installing MongoDB, if you get an error that the package `mongodb-org` could not be found, it could mean that the MongoDB repository is not in your source list, or the package database has not been updated. By following these steps, you should have MongoDB installed and running on your Debian system. This is not the first time I got errors related to gpg keys and the repository and I think with Debian 12 being very new it may pose an issue. What is your opinion on why this isn't working? |
What's with all the bold text, asterisks, and triple backticks?
The documentation one should follow for installing MongoDB on Debian is: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-debian The key bit of that page is: Quote:
You need to raise an issue with MongoDB Inc and ask them to provide Debian 12 support. (Or switch to software that comes native with Debian.) |
Quote:
|
I did not say it wont be supported.
The documentation states that MongoDB 6 is supported in Debian 10 and Debian 11. It does not list Debian 12. I have no idea whether that will change. Your attempt to install it from Mongo's Buster or Bullseye packages fails because, as the error text states, those packages have dependencies that do not exist in Debian 12. MongoDB Inc have chosen not to release a MongoDB package for Bookworm (Debian 12). Debian is not only a few days old. Debian Bookworm has been available for testing for close to two years, it was frozen six months ago to give plenty of time for those wanting to support it to test their software and finalize any necessary changes regarding package versions. The June release date was confirmed back in April. In other words, there has been enough opportunity for MongoDB Inc to prepare a Bookworm package before Debian 12 was released, but they have not done that. Will they do it eventually? Who knows? The developers of the software know. If you want to know too, you should ask the developers of the software. i.e. Mongo Inc. Ultimately there are three options: * Do nothing and hope the situation changes. * Try to accelerate things, by making sure the developer is aware of the issue, and that people care about it. * Use alternative software. Putting the error into a search engine shows the same failed dependency occurred when Ubuntu 22.04 LTS was released - it was about six months before an updated package was released for that. (I wonder what proportion of that time was because nobody reported the issue...?) |
All times are GMT -5. The time now is 01:15 AM. |