I recently upgraded my Ubuntu version to the latest 20.04 release. Some of my earlier projects (developed on 16.04) were compiling just fine with a gcc version of 5 (gcc-5.4.0).
The default version in Ubuntu 20.04 is gcc-9. I'm trying to switch my gcc version down to 5. I've gone through several posts such as How can I build and install gcc-5.4.0 on Ubuntu 18.04? and How to choose the default gcc and g++ version?, but the fact is that gcc-5 packages aren't even available for 20.04 (see https://packages.ubuntu.com/search?keywords=gcc-5).
As expected, the command
sudo apt install gcc-5
does not work. Is there a way I can install gcc-5 (and gcc-4) on the latest release of Ubuntu 20.04? It seems like I will somehow have to install packages that are available only in earlier releases such as 16.04 or 18.04.