-2

In order to update gcc version in my debian pc. I am following this answer but it didn't work for me.

┌─[shravan40@ChangeStreet] - [/etc/apt/sources.list.d] - [Mon Oct 24, 13:27]
└─[$] <> cat testing.list 
deb http://ftp.us.debian.org/debian testing main contrib non-free
┌─[shravan40@ChangeStreet] - [/etc/apt/sources.list.d] - [Mon Oct 24, 13:27]
└─[$] <>

┌─[shravan40@ChangeStreet] - [/etc/apt/preferences.d] - [Mon Oct 24, 13:27]
└─[$] <> cat testing 
Package: gcc
Pin: release a=testing
Pin-Priority: 100
┌─[shravan40@ChangeStreet] - [/etc/apt/preferences.d] - [Mon Oct 24, 13:27]
└─[$] <> 

┌─[shravan40@ChangeStreet] - [~] - [Mon Oct 24, 13:30]
└─[$] <> sudo apt-get install -t testing gcc
[sudo] password for shravan40: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version (4:4.9.2-2).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
┌─[shravan40@ChangeStreet] - [~] - [Mon Oct 24, 13:30]
└─[$] <> 
Shravan40
  • 159
  • Why there are downvotes without any explanation ? – Shravan40 Oct 24 '16 at 08:06
  • You are missing the step "3. Update apt database: sudo apt-get update" from the answer you're referring to. They downvote probably because of your prompt is too verbose. – 林果皞 Oct 24 '16 at 10:12

1 Answers1

0

I needed to add , in the end of line 1 of file testing.

┌─[shravan40@ChangeStreet] - [/etc/apt/preferences.d] - [Mon Oct 24, 13:27]
└─[$] <> cat testing 
Package: gcc,
Pin: release a=testing
Pin-Priority: 100
┌─[shravan40@ChangeStreet] - [/etc/apt/preferences.d] - [Mon Oct 24, 13:27]
└─[$] <> 
Shravan40
  • 159
  • "I needed to add , in the end of line 1 of file testing...." - what are you talking about? Where is the file you are discussing? –  Dec 31 '17 at 02:16