I was able to install gcc 10 but I need 10.2 not 10 and it keeps telling me gcc10.2 does not exist, well it does and I tried installing it by compiling and building it in the command line however that did not seem to install it or make my system recognize its existence in any way.
sudo apt-get install gcc-10 g++-10 works.
sudo apt-get install gcc-10.2 g++-10.2 does not
2 Answers
Tested on Ubuntu 20.04:
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt update
sudo apt install g++-10 I replaced the version used in this article with mine and installed to /usr/loacl/bin instead.
Then I needed to update the gcc alternatives as shown here. I replaced this version with mine. I used /usr/local/bin/gcc-10.2.0/bin/gcc-10.2 to use the executable instead of the folder. It's currently working for me.