🌐
Ubuntu
documentation.ubuntu.com › ubuntu-for-developers › tutorials › gcc-use
Develop with GCC on Ubuntu - Ubuntu for Developers
April 29, 2026 - This tutorial shows how to build and debug C programs on Ubuntu using GCC and GDB. For instructions on installing GCC and related tooling (including IDEs, debuggers, and the build system), see the dedicated guide on How to set up a development environment for GCC on Ubuntu. This article assumes that the tooling suggested in that article has been installed. The GNU Compiler ...
🌐
nixCraft
cyberciti.biz › nixcraft › howto › linux › ubuntu linux install gnu gcc compiler and development environment
Ubuntu Linux Install GNU GCC Compiler and Development Environment - nixCraft
August 11, 2025 - Explains how to install development tools such as GNU GCC C/C++ compiler and related tools on a Ubuntu Linux using the APT command.
Discussions

Need help installing a c compiler on ubuntu
It's been a while since I used Ubuntu but GCC is generally built into most Linux distros. Try "gcc -h" to check if it is installed. If it us then just use it. If not, show us the full output of what you tried to install in that picture. Text is preferable to pictures here More on reddit.com
🌐 r/linux4noobs
6
2
November 9, 2023
Any online c++ compiler for Ubuntu?
There are multiple options how to compile and test a program for Ubuntu on a Windows host. Use Windows Subsystem for Linux ( here is a handy script that can supposedly install it for you - you should check what it is doing though) Use Oracle VirtualBox to run Ubuntu in a full virtual machine Use Docker to run a a Ubuntu container (installation instructions here ). If you have no experience with Docker I highly recommend getting to know the concepts. Some intro can be found here . More on reddit.com
🌐 r/Cplusplus
12
4
December 28, 2020
How to OFFLINE install GCC CC and C compiler in LINUX RHEL7.3
A local mirror repo is the best option in my opinion, as u/veive mentioned. You can use tools like reposync to pull down a mirror of active repos to the local machine, and transfer this mirror either to the machine you're wanting to install GCC on or make it available on the same network. Repo URLs do not need to be remote, file URLs are completely valid. This means you can either use a local reposync'd copy made earlier or mounted installation media. If you have installation media for RHEL with the packages you want on it (anything but the minimal and netboot images should work for GCC), you can just point repo configs to their local paths. Some people discussing reposync on CentOS: https://www.centos.org/forums/viewtopic.php?t=61184 Installing from the repos on DVD installation media with RHEL: https://access.redhat.com/solutions/1355683 Using reposync with a RH support subscription (RHN): http://casesup.com/create-a-local-mirror-of-the-latest-update-for-red-hat-enterprise-linux-without-satellite/ A last ditch option if this proves too complex is to just work out the installation RPMs and their dependencies manually, transfer them into your isolated environment and install them directly with yum or rpm - neither tool needs an actual repository to work with, you can just give them a list of pre-downloaded package files to install. This is a fairly manual and annoying process. More on reddit.com
🌐 r/linuxquestions
25
3
September 5, 2018
Need help with C on Ubuntu
Linking is a part of the compilation process you don’t have to think about if you are a beginner. You should focus on learning basics of the C language. Don’t even worry about a fancy IDE, just grab a text editor you like and have an open terminal to do the compiling. More on reddit.com
🌐 r/C_Programming
54
47
July 3, 2021
🌐
LinuxConfig
linuxconfig.org › home › how to install gcc the c compiler on ubuntu 20.04 lts focal fossa linux
How to install GCC the C compiler on Ubuntu 20.04 LTS Focal Fossa Linux
September 21, 2025 - Although you can install the C compiler separately by installation of the gcc package, the recommended way to install the C compiler on Ubuntu 20.04 is by installation of the entire development package build-essential.
🌐
DataFlair
data-flair.training › blogs › install-c-on-linux
How to Install C - Learn to Install GCC Compiler for Ubuntu - DataFlair
July 3, 2019 - These are Steps to Install C using gcc compiler on linux (ubuntu) Operating system. This installtion process also guide you to write & run your first program
🌐
Cherry Servers
cherryservers.com › home › blog › linux › how to install gcc on ubuntu 22.04 [and compile a c program]
How to Install GCC on Ubuntu 22.04 [and Compile a C Program] | Cherry Servers
November 7, 2025 - You can install GCC with the build-essential package. This will install GCC as well as other popular packages such as make, which is often used with GCC to automate the compilation process of bigger software.
🌐
Linux.org
linux.org › home › forums › general linux forums › ask tuxbot (archived)
Installing C compiler | Linux.org
December 21, 2023 - sudo pacman -S base-devel Once you have the C compiler installed, you can start writing and compiling C and C++ code.
Find elsewhere
🌐
LinuxConfig
linuxconfig.org › home › how to install gcc the c compiler on ubuntu 22.04 lts jammy jellyfish linux
How to install GCC the C compiler on Ubuntu 22.04 LTS Jammy Jellyfish Linux
January 8, 2024 - $ sudo apt update $ sudo apt install build-essential · DO YOU NEED MULTIPLE C AND/OR C++ COMPILER VERSIONS? Visit our other tutorial on How to switch between multiple GCC and G++ compiler versions on Ubuntu 22.04 to see how to install multiple compiler versions on the same Ubuntu system.
🌐
Ubuntu
help.ubuntu.com › community › InstallingCompilers
InstallingCompilers - Community Help Wiki
August 10, 2012 - To install the manpages for c and c++ development, install the manpages-dev package. Note that GNU's Java compiler is not the same as the one developed and distributed by Sun Microsystems, and will not provide Java to the firefox browser. For that, please see Java.
🌐
LinuxConfig
linuxconfig.org › home › how to install gcc the c compiler on ubuntu 18.04 bionic beaver linux
How to install GCC the C compiler on Ubuntu 18.04 Bionic Beaver Linux
September 22, 2025 - Open up terminal and enter: ... Another way to install gcc compiler is to install it as part of build-essential package. build-essential package will also install additional libraries as well as g++ compiler. In most cases or if unsure this is exactly what you need:
🌐
YouTube
youtube.com › watch
How to Install GCC the C compiler on Ubuntu 22.04 LTS / Ubuntu 24.04 LTS Linux - YouTube
Learn how to install GCC, the C compiler, on Ubuntu 22.04 LTS (Linux) using the build-essential package. #Ubuntu #GCC #CCompiler #LinuxGCC (GNU Compiler Coll...
Published   June 28, 2023
🌐
Scaler
scaler.com › home › topics › how to install c and gcc compiler on linux?
How to Install C and GCC Compiler on Linux - Scaler Topics
June 10, 2022 - We are going to install the GCC compiler using the Linux terminal to install C on Linux. The GCC Compiler, and several other libraries and utilities required for building applications, can be found in the default Ubuntu repositories (Ubuntu is a Linux-based Operating System) under the build-essential meta-package.
🌐
YouTube
youtube.com › watch
How to Install GCC the C compiler on Ubuntu 24.04 LTS Linux - YouTube
### How to Install GCC the C Compiler on Ubuntu 24.04 LTS LinuxWelcome to our comprehensive tutorial on installing the GCC (GNU Compiler Collection) on Ubunt...
Published   July 18, 2024
🌐
CyberITHub
cyberithub.com › how-to-install-gcc-c-compiler-on-ubuntu-20-04-lts
How to Install GCC(C and C++ Compiler) on Ubuntu 20.04 LTS | CyberITHub
January 21, 2023 - This will download and install the package along with all its dependencies from Ubuntu repo. cyberithub@ubuntu:~$ sudo apt install gcc [sudo] password for cyberithub: Reading package lists...
Top answer
1 of 5
20

I'm still on Ubuntu 22.04 LTS but needed g++14. The sudo apt-get gcc-14 did not work for me, as it installed clang++14 for some reason (perhaps a misconfiguration on my part). What did work for me was following the instructions I found at https://www.dedicatedcore.com/blog/install-gcc-compiler-ubuntu/

The steps I took:

sudo apt install build-essential
sudo apt install libmpfr-dev libgmp3-dev libmpc-dev -y
wget https://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.gz
tar -xf gcc-14.1.0.tar.gz
cd gcc-14.1.0
./configure -v --build=$(uname -m)-linux-gnu --host=$(uname -m)-linux-gnu --target=$(uname -m)-linux-gnu --prefix=/usr/local/gcc-14.1.0 --enable-checking=release --enable-languages=c,c++ --disable-multilib --program-suffix=-14.1.0
make
sudo make install

And if you would like to make it the default:

sudo update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-14.1.0/bin/g++-14.1.0 14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-14.1.0/bin/gcc-14.1.0 14

After that, g++ showed I was running version 14.1.0. I was then able to compile my project that included some c++20/23 features that were not in the previous versions of g++ (chrono/format).

2 of 5
16

GCC-14 (and G++-14) is available in the Universe repository for Ubuntu 24.04, as evident in the Ubuntu Package archive.

It is equally evident that this package is not available for Ubuntu 22.04, so installing this on 22.04 will require some third-party interference, or you have to compile it yourself.

See here on how to enable the Universe repositories.

🌐
Learn Ubuntu
learnubuntu.com › install-gcc
How to Install GCC on Ubuntu
December 5, 2022 - gcc is required for compiling C and C++ code on Ubuntu. You can install it directly or with other dev tools with the build-essential package.
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install gcc compiler on ubuntu
How to Install GCC Compiler on Ubuntu {3 Simple Methods}
February 20, 2025 - Change the number of CPU cores to reflect your system's capabilities and setup. 8. After the build process is complete, install GCC using the following command: ... The system confirms GCC version 14.2.0 is installed. ... This guide showed how to install the GCC compiler on Ubuntu using three different methods.
🌐
MakeUseOf
makeuseof.com › home › linux › how to install a c compiler on linux
How to Install a C Compiler on Linux
October 23, 2021 - It's popular because it's licensed ... You can install Clang using your package manager. On Debian and Ubuntu, just install the clang package:...
🌐
Linuxize
linuxize.com › home › gcc › how to install gcc compiler on ubuntu 18.04
How to Install GCC Compiler on Ubuntu 18.04 | Linuxize
October 31, 2019 - Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.View author page ... This article explains how to install GCC on Ubuntu 20.04. The default Ubuntu repositories contain a meta-package named build-essential that includes the GNU compiler collection and other development libraries and tools.