By tihomir92
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!
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!
Hi,
Due to official docs on How to install MongoDB on Ubuntu:
Important
The mongodb package provided by Ubuntu is not maintained by MongoDB Inc.
and conflicts with the official mongodb-org package. If you have already installed
the mongodb package on your Ubuntu system, you must first uninstall the mongodb
package before proceeding with these instructions.
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 :)
To upgrade from a version earlier than the 4.0-series, you must successively
upgrade major releases until you have upgraded to 4.0-series. For example,
if you are running a 3.6-series, you must upgrade first to 4.0 before you can
upgrade to 4.2.
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.