19.8 C
Texas
angeloma
Senior Writer and partner

Install the latest version of GCC on Ubuntu 20.04?

Hello, friends. For many people installing the latest version of GCC can be quite important for daily work. So in this post, you will learn how to do it so that it can also help you with your tasks.

If you didn’t know, GCC is the compiler for the C language provided by the GNU project. With GCC we can use the C language on our computer but also with it we can create or run other applications like libraries.

The mythical GCC is one of the basic tools for compiling and building packages. Present in almost every Linux distribution out there, it is the basis for many processes in building a distribution.

Some people need for whatever reason to have the latest stable version of GCC. That is why we have prepared this post as simple as possible so that anyone can do it.

Install the latest version of GCC using Homebrew

- Advertisement -

Of all the ways we have to achieve this goal, maybe Homebrew is the one that makes it the easiest. So let’s take advantage of this extraordinary tool to achieve our goal.

The first step then is to install Homebrew on Ubuntu 20.04 / Debian 10 after that we can continue without any problems.

The next step is to simply run the brew command to install GCC, the latest version of which is 11.1.

brew install gcc

Then the whole download and installation process will start. If everything went well, you will see the following output on the screen.

1.- Install GCC on Ubuntu 20.04 / Debian 10
1.- Install GCC on Ubuntu 20.04 / Debian 10

To check that GCC is installed, you can display the version.

gcc-11 --version

In case you already have GCC installed globally, then you can go to the folder where the binary is and run

cd /home/linuxbrew/.linuxbrew/Cellar/gcc/11.1.0_1/bin
./gcc-11 --version

Sample Output

gcc-11 (Homebrew GCC 11.1.0_1) 11.1.0
Copyright (C) 2021 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.

So, enjoy it.

Conclusion

GCC is so common that sometimes we overlook it, but it is always good to have the latest stable version that can get us out of trouble at any time.

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article