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

6 Responses to Installing GCC13 on Ubuntu 22.04

  1. dmitriano says:

    GCC versions:
    https://gcc.gnu.org/

  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.

  3. superadmin says:

    def@DESKTOP-0DRJUG2:~/dev/repos/Awl$ g++ --version
    gcc --versiong++ (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0
    Copyright (C) 2023 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    def@DESKTOP-0DRJUG2:~/dev/repos/Awl$ gcc --version
    gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0
    Copyright (C) 2023 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Leave a Reply

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