Hello, I have an issue when try to update MongoDB from 3.6.3 to 4.4 on droplet with Ubuntu 18.04. I follow this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-20-04 but when run:
sudo apt install mongodb-org
The following error happened:
The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-shell but it is not going to be installed
Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
Then I try to install them and for all of them I receive the same error:
The following packages have unmet dependencies:
mongodb-org-mongos : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
Depends: libgcc-s1 (>= 4.2) but it is not installable
mongodb-org-server : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
Depends: libgcc-s1 (>= 4.2) but it is not installable
mongodb-org-shell : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
Depends: libgcc-s1 (>= 4.2) but it is not installable
Please, help me with this.
Thank you in advance!
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,
Due to official docs on How to install MongoDB on Ubuntu:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
It seems to be easy when you do not have any database deployed with MongoDB 3.x and you want to just start from scratch. You would uninstall version 3.x, and install 4.4. But you asked about updating (upgrading ?) from version 3.6.3 to 4.4, so it looks like you have the database already deployed. I am going to quote official doc again :)
When you have your MongoDB upgraded to 4.2, then you will be able to upgrade to 4.4.
So, what I would do:
1. Create a snapshot of your droplet, to be able to restore the current, well-working environment, in case of failure.
2. Create a new Ubuntu 18.04 droplet, and install mongodb-org ver. 3.6.2. You can download it from the official site: https://www.mongodb.com/try/download/community
3. Transfer the database to your new droplet.
4. On your new droplet successively upgrade MongoDB to version 4.4, due to official docs: https://docs.mongodb.com/manual/release-notes/4.0-upgrade-standalone/ https://docs.mongodb.com/manual/release-notes/4.2-upgrade-standalone/ https://docs.mongodb.com/manual/release-notes/4.4-upgrade-standalone/
5. On your old droplet uninstall MongoDB ver 3.6.3, and install version 4.4, due to this doc: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
6. Transfer your database from the new droplet to the old one.