Unable to locate package gcc-6 on Debian
As of 2020-02-08 gcc-6 is available as debian/strech package (oldstable).
https://packages.debian.org/search?keywords=gcc-6&searchon=names&suite=all§ion=all
You may add oldstable to /etc/apt/sources.list
.
https://wiki.debian.org/DebianOldStable
oldstable is a codename for the previous Debian stable repository, as long as security updates are provided. It is not just a name of the old stable version(s) of Debian.
Related videos on Youtube
peachykeen
Updated on September 18, 2022Comments
-
peachykeen over 1 year
I am unable to install gcc-6 on Debian when I run
sudo apt-get install gcc-6
. It saysE: Unable to locate package gcc-6
.The lowest version
gcc
will go viaapt-get
is 7. Is there a special repository I need to setup in order to get oldergcc
verisons? I tried to build gcc-6 from source but struggled, so if that is the only way to get a working copy of gcc-6, it would be much appreciated if you could walk me through the steps or show me a solid resource for doing this.For reference, my system information is as follows:
user@debian:~$ uname -a Linux debian 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
The reason I am looking for an older
gcc
version is that I am trying to compile an older version of Linux (3.19) but I keep getting an error with newergcc
versions (7 & 8) stating:include/linux/compiler-gcc.h:106:1: fatal error: linux/compiler-gcc7.h: No such file or directory #include gcc_header(__GNUC__) ^~~~
Thank you in advance for any help!
-
G-Man Says 'Reinstate Monica' about 4 yearsIf it’s saying ‘’compiler-gcc7.h: No such file or directory’’, I would question whether you have gcc-7 installed correctly. Can you compile other things with it?
-
peachykeen about 4 yearsThe error I believe is arising because kernel v3.19 doesn't support gcc compilers beyond v5.
-
-
peachykeen about 4 yearsSo I added the two lines
deb http://archive.debian.org/debian-archive/ oldstable main contrib non-free
anddeb-src http://archive.debian.org/debian-archive/ oldstable main contrib non-free
to/etc/apt/sources.list
butgcc-6
is still not found. -
AnFi about 4 yearsHave you execute
apt-get update
after adding oldstable tosources.list
? it is necessary to makeapt-get install …
see new available packages. -
peachykeen about 4 yearsThat was the issue. Thank you!
-
hafiz031 over 3 years@AnFi even after
apt-get update
it gives the same error on Ubuntu-20.04, I added the lines mentioned in peachykeen's comment.