0

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/"
Shravan40
  • 159

1 Answers1

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.

schaiba
  • 7,631
Shravan40
  • 159