🌐
GNU
gcc.gnu.org β€Ί releases.html
GCC Releases - GNU Project
April 30, 2026 - GCC releases may be downloaded from our mirror sites.
optimizing compiler produced by the GNU Project, key component of the GNU tool-chain and standard compiler for most projects related to GNU and the Linux kernel.
GCC_10.2_GNU_Compiler_Collection_self-compilation.png
gcc 11 1 0 compiling chicken screenshot
The GNU Compiler Collection (GCC; formerly GNU C Compiler) is a collection of compilers from the GNU Project that support various programming languages, hardware architectures, and operating systems. The Free Software Foundation … Wikipedia
Factsheet
Original author Richard Stallman
Developer GNU Project
Initial release March 22, 1987; 39 years ago (1987-03-22)
Factsheet
Original author Richard Stallman
Developer GNU Project
Initial release March 22, 1987; 39 years ago (1987-03-22)
🌐
Wikipedia
en.wikipedia.org β€Ί wiki β€Ί GNU_Compiler_Collection
GNU Compiler Collection - Wikipedia
2 days ago - As of the 16.1 release, GCC includes front ends for C (gcc), C++ (g++), Objective-C, Objective-C++, Fortran (gfortran), Ada (GNAT), Go (gccgo), D (gdc, since 9.1), Modula-2 (gm2, since 13.1), Rust (gccrs, since 15.1), COBOL (gcobol, since 15.1), and ALGOL 68 (ga68, since 16.1) programming languages, with the OpenMP and OpenACC parallel language extensions being supported since GCC 5.1. Versions prior to GCC 7 also supported Java (gcj), allowing compilation of Java to native machine code.
Discussions

How important are gcc versions?
Typically, you should just use the latest version available in your distro. The only reason to use an older version is when you're working on a project that's effectively stuck on that version due to weird quirks or some other constraint that explicitly ties you to a certain version. You can also just download the latest version if your distro is lagging behind. As for changes, you can check on the website. Here's GCC 14's change summary , for example. In general, when the N in GCC N changes, that's a big, destabilizing change. Those tend to introduce a large amount of changes and/or a large change to a major component. If the decimal increments, then that introduces fixes and minor improvements that won't cause any potential conflicts when updating. More on reddit.com
🌐 r/C_Programming
32
17
May 13, 2024
c++ - How to Check the Version of my gcc? - Stack Overflow
In file included from /usr/include/c++/4.8.2/locale:41:0, from /usr/include/c++/4.8.2/iomanip:43, from [...omitted by myself as it is irrelevant] /usr/include/c++/... More on stackoverflow.com
🌐 stackoverflow.com
what is the difference between the various versions of gcc? - Stack Overflow
When I go to gcc's web site https://gcc.gnu.org/, I see 3 current versions: 5.5, 7.2, and 6.4. Unfortunately, there's no explanation anywhere I could see of what the differences between the three m... More on stackoverflow.com
🌐 stackoverflow.com
How do I know what versions are supported by a compiler?
GCC is up to v.13 so v.11 is not quite the newest any longer. GNU has the list of features up on https://gcc.gnu.org/gcc-11/changes.html More on reddit.com
🌐 r/Cplusplus
9
8
April 28, 2023
🌐
Tamu
hprc.tamu.edu β€Ί kb β€Ί Software β€Ί GNU-Compiler-Collection
GNU Compiler Collection (GCC) - Texas A&M HPRC
It is not recommended to use this GCC version for research compiling purposes. It typically lags - and considerably so - the most recently available version of GCC, which is 12.2.0 as of this writing. Also, the basic operating system does not include the additional libraries required to take advantage of HPC hardware.
🌐
Reddit
reddit.com β€Ί r/c_programming β€Ί how important are gcc versions?
r/C_Programming on Reddit: How important are gcc versions?
May 13, 2024 -

I have started getting unto assembly and optimising code and I was wandering how important if at all is it to upgrade the computer I am using.

Currently I am on gcc 11.4 which feels fairly old at this point when I am looking at what's out there.

Are the differences between versions thst big or is it generally fairly unimportant

Top answer
1 of 3
15

The symlink to the 4.8.2 directory is nothing to worry about, it's normal for the libstdc++ headers on Red Hat Enterprise Linux (and therefore CentOS) to be arranged like that.

gcc --version will tell you the version of the gcc executable in your path.

rpm -q libstdc++-devel will tell you the version of the package that owns the C++ standard library headers.

rpm -ql libstdc++-devel will list the files installed by that package, which will include the files under /usr/include/c++/4.8.2

rpm --verify libstdc++-devel will check that you haven't messed up the C++ headers by replacing them with something else.

The error is more concerning, that implies you have messed something up. My guess would be it's in the from [...omitted by myself as it is irrelevant] part, which may actually be very relevant. std::locale should be declared in <bits/locale_classes.h> which is included before <bits/locale_facets_nonio.h>, so if it wasn't declared my guess is that you have some header that defines _LOCALE_CLASSES_H and prevents the standard library header from being read. Do not define include guards that start with underscores, they are reserved names.

2 of 3
3

I am not quite sure but below is more information

Stackoverflow: version of libc

Copy$ /lib/x86_64-linux-gnu/libc.so.6 
GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 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.
Compiled by GNU CC version 4.8.2.
Compiled on a Linux 3.13.9 system on 2014-04-12.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/eglibc/+bugs>.
mandar@ubuntu:~/Desktop$ 
🌐
Ubuntu
documentation.ubuntu.com β€Ί ubuntu-for-developers β€Ί reference β€Ί availability β€Ί gcc
Available GCC versions - Ubuntu for Developers
April 5, 2026 - This page lists GCC versions available in Ubuntu releases. Ubuntu GCC (deb) packages:,,, Ubuntu version, available GCC versions, gcc-defaults version,,, 25.10 (Questing Quokka), 11, 12, 13, 14, 15,...
Find elsewhere
🌐
Red Hat
developers.redhat.com β€Ί articles β€Ί 2025 β€Ί 04 β€Ί 16 β€Ί gcc-and-gcc-toolset-versions-rhel-explainer
GCC and gcc-toolset versions in RHEL: An explainer | Red Hat Developer
April 16, 2025 - This compiler receives full support for the entire life cycle of the major version of RHEL: ... Even though the upstream GCC project might no longer support these versions (such as GCC 8), Red Hat takes responsibility for maintaining them throughout RHEL’s life cycle.
🌐
GNU
gcc.gnu.org
GCC, the GNU Compiler Collection - GNU Project
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Objective-C++, Fortran, Ada, Go, D, Modula-2, COBOL, Rust, and Algol 68 as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.
🌐
Nig
sc.ddbj.nig.ac.jp β€Ί en β€Ί guides β€Ί software β€Ί DevelopmentEnvironment β€Ί gcc
C/C++ (GCC: GNU Compiler Collection)
For more information, refer to the manuals for each version). ... The rpm package included in CentOS 7 is GCC ver.4.8. series. Ver. 4.8 is an old version, so it is recommended to install a newer version. You can switch to ver. 9 as a newer version, so just install and use ver.
🌐
SourceForge
sourceforge.net β€Ί projects β€Ί gcc-win64
gcc-win64 download | SourceForge.net
Download gcc-win64 for free. x64 build of GCC for Windows. x64 C/C++ compiler for Windows using (unofficial build): - gmp - mpfr - mpc - isl - cloog - mingw-w64 - gcc - seh You need at least core2 command set support to run this application. Note that every version with bundled gdb needs at ...
🌐
Lbl
scienceit-docs.lbl.gov β€Ί hpc β€Ί software β€Ί compilers β€Ί gcc
GCC - Science IT Technical Documentation
August 13, 2024 - Several gcc compiler versions are available on Lawrencium. The default gcc compiler is gcc/11.4.0 available through module load gcc. Two other gcc versions are available: gcc/10.5.0 and gcc/13.2.0.
🌐
ArchWiki
wiki.archlinux.org β€Ί title β€Ί GNU_Compiler_Collection
GNU Compiler Collection - ArchWiki
searching for gcc9 for GCC 9 front-ends. Tip Use the CC (for C)[1] and CXX (for C++)[2] environment variables to specify which version of GCC will be used with e.g make or cmake.
🌐
Princeton CS Guide
csguide.cs.princeton.edu β€Ί software β€Ί gcc
GCC, the GNU Compiler Collection | Department of Computer Science Computing Guide
All cycle servers have DevToolSet installed and gcc versions 4.9.2 and 5.3.1 are available. Version 4.8.5 is the default gcc version.
🌐
GitHub
github.com β€Ί gcc-mirror β€Ί gcc
GitHub - gcc-mirror/gcc Β· GitHub
The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. ...
Starred by 11K users
Forked by 4.8K users
Languages Β  C++ 30.0% | C 29.4% | Ada 13.9% | D 5.9% | Go 5.2% | HTML 3.6%
Top answer
1 of 10
411

First erase the current update-alternatives setup for gcc and g++:

sudo update-alternatives --remove-all gcc 
sudo update-alternatives --remove-all g++

Install Packages

It seems that both gcc-4.3 and gcc-4.4 are installed after install build-essential. However, we can explicitly install the following packages:

sudo apt-get install gcc-4.3 gcc-4.4 g++-4.3 g++-4.4

Install Alternatives

Symbolic links cc and c++ are installed by default. We will install symbol links for gcc and g++, then link cc and c++ to gcc and g++ respectively. (Note that the 10, 20 and 30 options are the priorities for each alternative, where a bigger number is a higher priority.)

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.3 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 20

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.3 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 20

sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc

sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++

Configure Alternatives

The last step is configuring the default commands for gcc, g++. It's easy to switch between 4.3 and 4.4 interactively:

sudo update-alternatives --config gcc
sudo update-alternatives --config g++

Or switch using script:

#!/bin/sh

if [ -z "$1" ]; then
    echo "usage: $0 version" 1>&2
    exit 1
fi

if [ ! -f "/usr/bin/gcc-$1" ] || [ ! -f "/usr/bin/g++-$1" ]; then
    echo "no such version gcc/g++ installed" 1>&2
    exit 1
fi

update-alternatives --set gcc "/usr/bin/gcc-$1"
update-alternatives --set g++ "/usr/bin/g++-$1"
2 of 10
62

execute in terminal :

gcc -v
g++ -v

Okay, so that part is fairly simple. The tricky part is that when you issue the command GCC it is actually a sybolic link to which ever version of GCC you are using. What this means is we can create a symbolic link from GCC to whichever version of GCC we want.

  • You can see the symbolic link :
ls -la /usr/bin | grep gcc-4.4
ls -la /usr/bin | grep g++-4.4
  • So what we need to do is remove the GCC symlink and the G++ symlink and then recreate them linked to GCC 4.3 and G++ 4.3:
rm /usr/bin/gcc
rm /usr/bin/g++

ln -s /usr/bin/gcc-4.3 /usr/bin/gcc
ln -s /usr/bin/g++-4.3 /usr/bin/g++
  • Now if we check the symbolic links again we will see GCC & G++ are now linked to GCC 4.3 and G++ 4.3:
ls -la /usr/bin/ | grep gcc
ls -la /usr/bin/ | grep g++
  • Finally we can check our GCC -v again and make sure we are using the correct version:
gcc -v
g++ -v
Top answer
1 of 2
15

First of all try to find a Ubuntu release that was out after the release of the required version of GCC. You can find the release history of GCC on GCC Releases - GNU Project - Free Software Foundation (FSF) and that of Ubuntu on Ubuntu version history - Wikipedia.

GCC 6.3 was released on December 21, 2016 and the closest Ubuntu release was Ubuntu 17.04 (Zesty Zapus) which was released in April 2017. You can use the archives of Zesty to install that. But since Zesty reached end of life way back in January 2018, therefore, its archives have been moved to Old Releases. To install GCC 6.3 from its repository:

  1. Add the repository of Zesty and disable the Universe repository of Bionic since it contains 6.4 as well as 6.5 which might get installed while trying to install 6.3.

    echo "deb http://old-releases.ubuntu.com/ubuntu zesty main" | sudo tee /etc/apt/sources.list.d/zesty.list
    sudo apt-add-repository -r universe
    
  2. Update the available package information and install GCC 6.3.

    sudo apt update
    sudo apt install gcc-6
    
  3. Add GCC 6 as an alternative for GCC.

    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 1
    
  4. Check the GCC version using gcc -v. You should get the output like:

    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.3.0-12ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2) 
    
  5. Once you're done with "making", you can remove the installed GCC 6.3 and the repository information of Zesty. And re-enable Universe repository of Bionic.

    sudo apt purge gcc-6
    sudo apt autoremove --purge
    sudo rm /etc/apt/sources.list.d/zesty.list
    sudo apt-add-repository universe
    
  6. Fix the symlink for /usr/bin/gcc.

    ln -sf /usr/bin/gcc-7 /usr/bin/gcc
    
2 of 2
1

Compile from source

Here I am maintaining a list of all trusted GCC packages for Ubuntu: How do I use the latest GCC on Ubuntu?

If your GCC of interest is not there, I don't see any option besides compiling your GCC from source (or better, port your software).

The easiest way is to check if crosstool-NG supports it that version. Here I've given an example: https://stackoverflow.com/questions/10412684/how-to-compile-my-own-glibc-c-standard-library-from-source-and-use-it/52454710#52454710

If not, you will just have to fight with manual build instructions found on Google e.g.: https://stackoverflow.com/questions/26305738/can-i-build-gcc-for-arm-with-an-x64-one/26306591#26306591