on Ubuntu 18.04 I used the apt repo ubuntu-toolchaing-r/test
apt install gcc-10 g+±10 gfortran-10. Kurt