Issue
Getting this error on Ubuntu 20.04.
I had origianlly installed the default version 3.0.6 on ubuntu.
I have purged it and installed 5.0.9. But now I get this error in logs and mongod won't start.
"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."
Solution
It's a massive gap between versions. You need to upgrade all versions in-between one at a time: https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-standalone/#upgrade-version-path:
To upgrade an existing MongoDB deployment to 5.0, you must be running a 4.4-series release.
To upgrade from a version earlier than the 4.4-series, you must successively upgrade major releases until you have upgraded to 4.4-series. For example, if you are running a 4.2-series, you must upgrade first to 4.4 before you can upgrade to 5.0.
Or you can export data from 3.0.6 , start 5.0.9 with empty data directory (Storage.dbPath option in config), import data to 5.0.9
Answered By - Alex Blex Answer Checked By - Katrina (WPSolving Volunteer)