This is not recommended but you can install version 11.3 by downloading gcc-11 (version 11.3) from here. And downloading the dependencies gcc-11-base and libgcc-11-dev.

Then, run sudo apt install /path/to/file where /path/to/file is the path to the actual downloaded file. If it can't find the file, you may need to put it in double quotes like "/path/to/file".

You will need to install the gcc-11-base package first, then libgcc-11-dev and finally, gcc-11.

For example, if it's downloaded to your Downloads directory:

sudo apt install $HOME/Downloads/gcc-11-base_11.3.0-6ubuntu1_amd64.deb

and

sudo apt install $HOME/Downloads/libgcc-11-dev_11.3.0-6ubuntu1_amd64.deb

and

sudo apt install $HOME/Downloads/gcc-11_11.3.0-6ubuntu1_amd64.deb

I'm pretty sure gcc only requires gcc-11 >11.2 so this should downgrade your version of gcc and when you're done compiling or whatever you need it for, simply run:

sudo apt update
sudo apt install --reinstall gcc-11 gcc-11-base libgcc-11-dev

to upgrade back to the current version of gcc-11 (11.4).

Granted, the installation isn't guaranteed to work, could be insecure or lacking security updates. Also, you may run into dependency issues. If that's the case, you'd have to tread carefully or install each dependency one by one but always pay attention to what, if any, packages would need to uninstall when installing weird versions because you don't want to inadvertently uninstall a bunch of stuff you want or need.


EDIT: you will need to install dependencies (included above) but you can run the following commands to do it more quickly.

Run the following commands to create a working directory and download the packages:

cd
mkdir GCC11.3
cd GCC11.3
wget 'http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-11/gcc-11-base_11.3.0-6ubuntu1_amd64.deb'
wget 'http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-11/libgcc-11-dev_11.3.0-6ubuntu1_amd64.deb'
wget 'http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-11/gcc-11_11.3.0-6ubuntu1_amd64.deb'

Now, install the packages. Again, however, remember to pay attention to what, if any packages will be uninstalled when you install these weird versions. Review the list before you select Y to accept the changes!:

sudo apt install ./gcc*.deb

And again, when you're done compiling or whatever you need gcc 11.3 for, simply run:

sudo apt install --reinstall gcc-11 gcc-11-base libgcc-dev

to upgrade back to gcc 11.4.

Answer from mchid on askubuntu.com
🌐
GNU
gcc.gnu.org › releases.html
GCC Releases - GNU Project
April 30, 2026 - GCC releases may be downloaded from our mirror sites.
🌐
GNU
ftp.gnu.org › gnu › gcc › gcc-11.3.0
Index of /gnu/gcc/gcc-11.3.0
Index of /gnu/gcc/gcc-11.3.0 · Apache/2.4.52 (Trisquel_GNU/Linux) Server at ftp.gnu.org Port 443
🌐
Pkgs.org
pkgs.org › download › gcc
Gcc Download (APK, DEB, EOPKG, IPK, PKG, RPM, TXZ, XBPS, XZ, ZST)
Download gcc linux packages for Adélie, AlmaLinux, Alpine, ALT Linux, Amazon Linux, Arch Linux, CentOS, Debian, Fedora, FreeBSD, KaOS, Mageia, OpenMandriva, openSUSE, OpenWrt, PCLinuxOS, Rocky Linux, Slackware, Solus, Ubuntu, Void Linux · Filter: Distros: all Arches: arm intel Types: official thirdparty ... gcc latest versions: 12.1.1, 12.1.0, 12.0.1, 12, 11.3.1, 11.3.0, 11.2.1, 11.2.0, 11, 10.4.0, 10.3.1, 10.3.0, 10.2.1pre1, 10.2.1, 10
Top answer
1 of 1
2

This is not recommended but you can install version 11.3 by downloading gcc-11 (version 11.3) from here. And downloading the dependencies gcc-11-base and libgcc-11-dev.

Then, run sudo apt install /path/to/file where /path/to/file is the path to the actual downloaded file. If it can't find the file, you may need to put it in double quotes like "/path/to/file".

You will need to install the gcc-11-base package first, then libgcc-11-dev and finally, gcc-11.

For example, if it's downloaded to your Downloads directory:

sudo apt install $HOME/Downloads/gcc-11-base_11.3.0-6ubuntu1_amd64.deb

and

sudo apt install $HOME/Downloads/libgcc-11-dev_11.3.0-6ubuntu1_amd64.deb

and

sudo apt install $HOME/Downloads/gcc-11_11.3.0-6ubuntu1_amd64.deb

I'm pretty sure gcc only requires gcc-11 >11.2 so this should downgrade your version of gcc and when you're done compiling or whatever you need it for, simply run:

sudo apt update
sudo apt install --reinstall gcc-11 gcc-11-base libgcc-11-dev

to upgrade back to the current version of gcc-11 (11.4).

Granted, the installation isn't guaranteed to work, could be insecure or lacking security updates. Also, you may run into dependency issues. If that's the case, you'd have to tread carefully or install each dependency one by one but always pay attention to what, if any, packages would need to uninstall when installing weird versions because you don't want to inadvertently uninstall a bunch of stuff you want or need.


EDIT: you will need to install dependencies (included above) but you can run the following commands to do it more quickly.

Run the following commands to create a working directory and download the packages:

cd
mkdir GCC11.3
cd GCC11.3
wget 'http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-11/gcc-11-base_11.3.0-6ubuntu1_amd64.deb'
wget 'http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-11/libgcc-11-dev_11.3.0-6ubuntu1_amd64.deb'
wget 'http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-11/gcc-11_11.3.0-6ubuntu1_amd64.deb'

Now, install the packages. Again, however, remember to pay attention to what, if any packages will be uninstalled when you install these weird versions. Review the list before you select Y to accept the changes!:

sudo apt install ./gcc*.deb

And again, when you're done compiling or whatever you need gcc 11.3 for, simply run:

sudo apt install --reinstall gcc-11 gcc-11-base libgcc-dev

to upgrade back to gcc 11.4.

🌐
GNU
gcc.gnu.org › onlinedocs › gcc-11.3.0 › gcc
Top (Using the GNU Compiler Collection (GCC))
This manual documents how to use the GNU compilers, as well as their features and incompatibilities, and how to report bugs. It corresponds to the compilers (GCC) version 11.3.0. The internals of the GNU compilers, including how to port them to new targets and some information about how to write front ends for new languages, are documented in a separate manual.
🌐
GNU
gcc.gnu.org › onlinedocs › 11.3.0
GCC 11.3 manuals - GNU Project
October 26, 2022 - GCC 11.3 GNU Fortran Manual (also in PDF or PostScript or an HTML tarball)
🌐
Debian
packages.debian.org › sid › main › gcc-11-base
Details of package gcc-11-base in sid
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
Find elsewhere
🌐
Ubuntu
packages.ubuntu.com › jammy › gcc-11
Ubuntu – Details of package gcc-11 in jammy
Download Source Package gcc-11: [gcc-11_11.4.0-1ubuntu1~22.04.3.dsc] [gcc-11_11.4.0.orig.tar.gz] [gcc-11_11.4.0-1ubuntu1~22.04.3.debian.tar.xz] Ubuntu Developers (Mail Archive) Please consider filing a bug or asking a question via Launchpad before contacting the maintainer directly.
🌐
GNU
gcc.gnu.org › install › download.html
Downloading GCC - GNU Project
April 27, 2026 - The source distribution includes ... (GCC 13 and later) and Algol 68 (GCC 16 and later, experimental) compilers, as well as runtime libraries for C++, Objective-C, COBOL, Fortran and Algol 68. For previous versions these were downloadable as separate components such as the core ...
🌐
Pkgs.org
pkgs.org › download › gcc-11
Gcc-11 Download for Linux (apk deb)
Search and download Linux packages for Adélie, AlmaLinux, Alpine, ALT Linux, Arch Linux, CentOS, Debian, Fedora, KaOS, Mageia, Mint, OpenMandriva, openSUSE, OpenWrt, RHEL, Rocky Linux, Slackware, Solus, Ubuntu and Void Linux distributions
🌐
GNU
gcc.gnu.org › gcc-11
GCC 11 Release Series - GNU Project
July 19, 2024 - To obtain GCC please use our mirror sites or our version control system.
🌐
RPMfind
rpmfind.net › linux › rpm2html › search.php
RPM resource gcc
The GNU Compiler Collection (GCC) provides a standard conforming and highly portable ISO C and ISO C++ compiler.
🌐
Ask Ubuntu
askubuntu.com › questions › 1482895 › cant-download-gcc-11-3-0
nvidia - can't download gcc 11.3.0 - Ask Ubuntu
August 19, 2023 - I want to install NVIDIA CUDA. But in the official supported versions table, it says that: cuda ubuntu supported versions. So I tried to remove gcc 11.4.0 from my sistem and install 11.3.0. I downloaded the zip folder of it, then changed directory into 11.3.0 folder.
🌐
Debian
packages.debian.org › gcc-11
Debian -- Package Search Results -- gcc-11
You have searched for packages that names contain gcc-11 in all suites, all sections, and all architectures. Found 100 matching packages. Your keyword was too generic, for optimizing reasons some results might have been suppressed. Please consider using a longer keyword or more keywords. bookworm (oldstable) (devel): GNU C compiler 11.3.0-12: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x
🌐
openSUSE
software.opensuse.org › download › package
Install package devel:gcc / gcc11
zypper addrepo https://download.opensuse.org/repositories/devel:gcc/openSUSE_Factory/devel:gcc.repo zypper refresh zypper install gcc11 · Packages for openSUSE Factory zSystems: gcc11-11.5.0+git3328-2.1.s390x.rpm gcc11-11.5.0+git3328-2.1.src.rpm · Packages for openSUSE Factory RISCV: gcc11-11.3.1+git2550-160.1.riscv64.rpm gcc11-11.3.1+git2550-160.1.src.rpm
🌐
GNU
gcc.gnu.org › onlinedocs
GCC online documentation - GNU Project
May 6, 2026 - GNU M2 15.3 Manual (also in PDF or PostScript or an HTML tarball) GCC COBOL 15.3 Manual Page (also in PDF) and GCC COBOL 15.3 I/O API Manual Page (also in PDF)