Tested on Ubuntu 20.04:

sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt update
sudo apt install g++-10
Answer from Vladimir Talybin on askubuntu.com
🌐
Reddit
reddit.com › r/debian › installing gcc-10 on debian buster
r/debian on Reddit: Installing gcc-10 on Debian Buster
April 14, 2021 -

I have a hard time installing gcc-10 package (with all c/c++ stuff) on my Debian Buster. I would line to download and install the package from this mirror: http://ftp.cz.debian.org/debian. The package is there at http://ftp.cz.debian.org/debian/pool/main/g/gcc-10/.

In debian, I added the following line to the /etc/apt/sources.list file:

deb http://ftp.cz.debian.org/debian buster main

Then I ran apt-get update with the following result:

Get:1 http://ftp.cz.debian.org/debian buster InRelease [121 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]                       
Hit:3 http://deb.debian.org/debian buster InRelease                                                       
Get:4 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]                                     
Get:5 http://security.debian.org/debian-security buster/updates/main amd64 Packages [272 kB]              
Get:7 http://ftp.cz.debian.org/debian buster/main amd64 Packages [7,907 kB]
Hit:6 https://packagecloud.io/github/git-lfs/debian buster InRelease                         
Fetched 8,417 kB in 7s (1,146 kB/s)                                                                       
Reading package lists... Done

But then, when I run apt-get install gcc-10, i get this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gcc-10

Is there anything I am missing or doing wrong?

🌐
Debian
packages.debian.org › sid › gcc-10
Debian -- Details of package gcc-10 in sid
dep: libcc1-0 (>= 10.4.0-9) [ia64] GCC cc1 plugin for GDB ·
🌐
Debian
packages.debian.org › sid › gcc-10-base
Debian -- Details of package gcc-10-base in sid
This package contains files common to all languages and libraries contained in the GNU Compiler Collection (GCC).
🌐
Debian
packages.debian.org › bullseye › gcc-10
Debian -- Details of package gcc-10 in bullseye
gcc-10-hppa64-linux-gnu · This is the GNU C compiler, a fairly portable optimizing compiler for C. dep: binutils (>= 2.35.1) GNU assembler, linker and binary utilities · dep: cpp-10 (= 10.2.1-6) GNU C preprocessor · dep: gcc-10-base (= 10.2.1-6) GCC, the GNU Compiler Collection (base package) dep: libc6 (>= 2.14) [amd64] GNU C Library: Shared libraries also a virtual package provided by libc6-udeb ·
🌐
GitHub
gist.github.com › s3rvac › 76ac07f21d5635209accc11fa56bd3fb
Steps to build GCC 10 on Debian Buster. · GitHub
Steps to build GCC 10 on Debian Buster. GitHub Gist: instantly share code, notes, and snippets.
Find elsewhere
🌐
Linux Today
linuxtoday.com › home › developer
How to Install GCC Compiler on Debian 12, 11, 10
July 12, 2023 - Learn how to install GCC compiler and related tools (such as make, debugger, man pages) on Debian using the command line.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › debian linux › how to install gcc compiler on debian 12/11/10 linux
Debian Linux Install GNU GCC Compiler using APT command - nixCraft
August 17, 2024 - Learn how to install GNU GCC compiler & tools such as make, g++, headers files to write code using C/C++ on a Debian Linux 12/11/10 using APT
🌐
The Mail Archive
mail-archive.com › debian-gcc@lists.debian.org › msg59263.html
Installing gcc-10 on buster
October 10, 2021 - I hoped to find gcc packages in Debian backports, but there aren't any - perhaps there could be? But maybe I can just install the bullseye gcc? I added sources.list lines for both buster and bullseye and configured APT::Default-Release "buster"; and then: # apt-get -t bullseye install gcc-10 ...
🌐
Tutorial for Linux
tutorialforlinux.com › step by step – gcc 10.3 installation on debian bullseye
Step by step - GCC 10.3 Installation on Debian Bullseye • tutorialforlinux.com
May 23, 2021 - GNU/Linux Debian Bullseye Installing GCC 10.3 from Source – Step by step Guide How to Install GNU Compiler Collection 10.3.x from Source on Debian GNU/Linux Bullseye 11.x desktop – Step by step Tutorial. And the GCC 10.3 for Debian Bullseye is a Compilers Collection currently supporting ...
🌐
Debian
packages.debian.org › bullseye › gcc-10-base
Details of package gcc-10-base in bullseye
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
🌐
Debian
packages.debian.org › sid › gcc-10-source
Debian -- Details of package gcc-10-source in sid
Package not available in this suite · See our contact page to get in touch
🌐
Debian User Forums
forums.debian.net › viewtopic.php
gcc-10 packages in debian 10.6 - Debian User Forums
Both this memtest86+ Pre-Compiled Bootable ISO (.gz) package (download link) and the one from debian 10 package run perfectly find to confirm no defect found in the RAM of my computer. Perhaps, I should try Mint Linux. The gcc-10 package is available in both Sid and Bullseye.I wonder when will gcc-10 be fully ported to debian 10.
🌐
Debian
tracker.debian.org › pkg › gcc-10
gcc-10 - Debian Package Tracker
10.2.1-6: [.dsc, use dget on this link to retrieve source package] [changelog] [copyright] [rules] [control]
🌐
LinuxForDevices
linuxfordevices.com › home › debian › installing the gcc compiler on ubuntu/debian
Installing the GCC Compiler on Ubuntu/Debian - LinuxForDevices
August 6, 2022 - Installing the GCC compiler is a very easy task on Debian. The APT package manager and the APT repository has everything ready for you. Let's look at how we