Installing GCC13 on Ubuntu 22.04

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-13 g++-13
ll /usr/bin/gcc-13
ll /usr/bin/g++-13
update-alternatives --display gcc
ll /etc/alternatives/g*
sudo update-alternatives --remove-all gcc 
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10 --slave /usr/bin/g++ g++ /usr/bin/g++-13
g++ --version
gcc --version

5 Responses to Installing GCC13 on Ubuntu 22.04

  1. dmitriano says:

    GCC versions:

  2. Josué Andrade Gomes says:

    Thank you!

    1. Cynthia Scheiiemantle says:

      Able to install Gfortran-13 after completing steps above. gfortran-13 –version showed gfortran-13 present. Also tested gfortran-10 , gfortran-11 , gfortran 12. All present.

      Version now on Ubuntu 22.04.4, (fresh install}

      gfortran-10 10.5.6
      gfortran-11 11.4.0
      gfortran-12 12.3.0
      gfortran-13 13.1.0

      Have compiled Code with Gfortran-10,11,12. Only done minor tests with Gfortran-13. So disclaimer as to full funcionality.

Leave a Reply

Your email address will not be published. Required fields are marked *