How to get the latest version of GCC on Debian 11 / 10

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hello, friends. In this post, you will learn how to get the latest version of GCC in Debian 11 / 10.

GCC is the compiler of the GNU project for C language, and one of the most important bases that we have on Linux. Thanks to it, compilations and program creations of all kinds are made.

As expected, GCC is present by default in all Linux distributions, however, not always in the latest version. So if you are a C or C++ developer or use compiling intensively, it can be a help to have the latest stable version of GCC.

There are several ways, but we will use Homebrew for this.

How to get the latest version of GCC on Debian 11 / 10

There are many ways to get the latest stable version of GCC, but today I will present you the easiest one that every user can do.

For this, Homebrew is our salvation. First, install it

How to install Homebrew on Debian 11

Note: These instructions will also work for Debian 10

Thereafter, you just have to run the following command

brew install gcc
Install latest version of GCC on Debian 11
Install latest version of GCC on Debian 11 / 10

This way, you will get the latest version, which is 12.

To test that the installation has been successful, just run the following command

gcc-12 --version

And you will have an output screen like the following one

gcc-12 (Homebrew GCC 12.2.0) 12.2.0
Copyright (C) 2022 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.
GCC on Debian 11
GCC on Debian 11

This is how fast and easy you can use it for your projects.

Conclusion

GCC is an important tool for many compilers and is a part of the system that you can find easily. I hope that now that you know how to get the latest stable version of it, you can take full advantage of it.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook