🌐
GNU
gcc.gnu.org β€Ί releases.html
GCC Releases - GNU Project
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; 38 years ago (1987-03-22)
Factsheet
Original author Richard Stallman
Developer GNU Project
Initial release March 22, 1987; 38 years ago (1987-03-22)
🌐
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.
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++ - Update GCC on Ubuntu - Stack Overflow
GCC 10 will be named gcc-10 (or something similar, not gcc). "version 9.4 is more up-to-date than some 10.x versions" They mean 9.y can be released after 10.x to fix some bugs in the old version, but it doesn't really matter. Bigger number = better version. ... You could also upgrade to Ubuntu 22.04 which is the latest ... More on stackoverflow.com
🌐 stackoverflow.com
c++ - Should i use the latest GCC version ( in general, and specifically today ) - Stack Overflow
I was wondering if it is safe to use the latest GCC version, or do people usually go a few versions back (and if so how many). Are there trusted versions which can be assumed to be (relatively) bug... More on stackoverflow.com
🌐 stackoverflow.com
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
🌐
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 ...
🌐
Wikipedia
en.wikipedia.org β€Ί wiki β€Ί GNU_Compiler_Collection
GNU Compiler Collection - Wikipedia
3 weeks ago - As of the 15.1 release, GCC includes ... 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....
🌐
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

Find elsewhere
Top answer
1 of 1
18

This is a common pattern in linux. When there are multiple versions of the same program installed, though the executables are all present in the /usr/bin/ directory, only one of them is "visible" as that program. For example, if you install gcc-9 and gcc-10, both executables are present as /usr/bin/gcc-9 and /usr/bin/gcc-10 but only one of them is visible as gcc. This happens by symlinking a preferred version to the same directory as /usr/bin/gcc. In ubuntu 20.04, the preferred version is gcc-9 and so, gcc-9 is symlinked as gcc.

You can check this by running the following command.

$ which gcc | xargs file

The output will be

/usr/bin/gcc: symbolic link to gcc-9

There are a few things you can do to use gcc-10 as your c compiler.

  1. Directly call the gcc-10 executable. Instead of using gcc <code.c>, call gcc-10 <code.c>.
  2. You can manually symlink gcc-10 as the preferred gcc. Assuming you did not modify the system paths, the following command can be used.
# ln -s /usr/bin/gcc-10 /usr/local/bin/gcc

This works because, by default, the executables in /usr/local/bin/ take precedence over /usr/bin/.

  1. If you are using bash, you can create an alias for gcc as gcc-10. Add the following line to your .bashrc.
alias gcc="gcc-10"

Remember to relaunch bash or source ~/.bashrc.

  1. Using update-alternatives (Thanks to @ted-lyngmo for pointing it out). Debian based distributions supply a separate program, that can make symlinking easier / more functional. Read more using man update-alternatives. To use gcc-10 as the preferred gcc, use the following command.
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60

The above command says, /usr/bin/gcc is the link needed and the name is gcc, the target executable is /usr/bin/gcc-10 and it has a priority of 60.

This links gcc to /etc/alternatives/gcc, which itself is a symlink to /usr/bin/gcc-10. If a higher priority program is added to update-alternatives, /etc/alternatives/gcc points to the higher priority program.

If you don't have any specific reason, I would also recommend to upgrade to a newer ubuntu version, so that the default gcc is a newer one.

I read on the gcc website that version 9.4 is more up-to-date than some 10.x versions.

With newer gcc versions, new features are added. Support for newer c/c++ standards are also added. Eg. You can read the changes for gcc-10 here. But people still need gcc-9 because some programs only build with gcc-9. So, GNU maintains gcc-9 (and much older versions) for a long time. Bugs are fixed, and newer releases are made. This can happen after the release of a newer gcc version. So, it is very much possible that a version of gcc-9 is newer than a version of gcc-10.

🌐
Baeldung
baeldung.com β€Ί home β€Ί installation β€Ί how to install the latest version of gcc on ubuntu
How to Install the Latest Version of GCC on Ubuntu | Baeldung on Linux
November 17, 2024 - Before checking out the step-by-step process, let’s note that the Ubuntu Universe repository contains GCC-14 (14.2.0, specifically), which is the latest version available.
🌐
GitHub
github.com β€Ί gcc-mirror β€Ί gcc
GitHub - gcc-mirror/gcc
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*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully.
Starred by 10.7K users
Forked by 4.7K users
Languages Β  C++ 30.1% | C 29.3% | Ada 14.0% | D 5.9% | Go 5.3% | HTML 3.6%
🌐
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 ...
🌐
GNU
gnu.org β€Ί software β€Ί gcc
GCC, the GNU Compiler Collection - GNU Project
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, D, Modula-2, and COBOL as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, ...
🌐
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 - For newer features: Use gcc-toolset if you need access to the latest GCC features, but be aware of the shorter 2-year support window. Note that you can install gcc and multiple versions of gcc-toolset (e.g., gcc-toolset-12 and gcc-toolset-14) ...
🌐
Linux Mint Forums
forums.linuxmint.com β€Ί board index β€Ί interests β€Ί programming & development
How to Update GCC Latest Version? - Linux Mint Forums
June 12, 2023 - gcc-11 --version gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions.
🌐
Ubuntu
documentation.ubuntu.com β€Ί ubuntu-for-developers β€Ί reference β€Ί availability β€Ί gcc
Available GCC versions - Ubuntu for Developers
5 days ago - Ubuntu GCC (deb) packages:,,, Ubuntu version, available GCC versions, gcc-defaults version,,, 25.10 (Questing Quokka), 11, 12, 13, 14, 15, 15,, 25.04 (Plucky Puffin), 11, 12, 13, 14, 15, 14,, 24.10...
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

$ /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$ 
🌐
Sorush Khajepor
iamsorush.com β€Ί posts β€Ί build-gcc11
Build GCC 11 from source on Ubuntu
Here I am building and installing the latest GCC, 11.1, on Ubuntu 21.04 from the source. The procedure is explained step by step.