0

This question already has an answer here:

I am trying to update gcc version in debian pc, but no luck yet.

I have followed the instruction given in this answer and changed the last command to apt-get install gcc-5.4 g++-5.4 but it seems no installable package is available for latest gcc verion. Even aptitude search gcc-5 does not list anything.

EDIT : Adding output of cat /etc/*-release

PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

marked as duplicate by GAD3R, John WH Smith, techraf, countermode, roaima Oct 21 '16 at 12:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Please add the output of cat /etc/*-release – schaiba Oct 20 '16 at 11:54
  • @schaiba : I have added it's output in question. – Shravan40 Oct 20 '16 at 11:56
  • 7
    Those instructions you are quoting are for Ubuntu. On Debian 8 gcc5 is not available. Please see unix.stackexchange.com/questions/284817/… . – schaiba Oct 20 '16 at 11:59
0

Latest version of gcc can be installed from from testing on debian jessie using apt-pinning:

cd /etc/apt/sources.list.d/
touch testing.list

Add this deb http://ftp.us.debian.org/debian testing main contrib non-free to file testing.list

Now move into directory

/etc/apt/preferences.d/

And add this

Package: *
Pin: release a=testing
Pin-Priority: 100

to newly created file testing.list.

apt-get update
sudo apt-get install -t testing gcc

Note that using -t testing you tell apt-get to install gcc from testing sources as configured in above steps.

Not the answer you're looking for? Browse other questions tagged or ask your own question.