-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]
└─[$] <> 

closed as unclear what you're asking by schaiba, Stephen Kitt, countermode, Jeff Schaller, GAD3R Oct 24 '16 at 11:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Why there are downvotes without any explanation ? – Shravan40 Oct 24 '16 at 8: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
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]
└─[$] <> 
  • "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? – user56041 Dec 31 '17 at 2:16

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