无法更新 GCC 版本

无法更新 GCC 版本

为了更新gcc我的 debian 电脑中的版本。我正在关注这个回答但这对我不起作用。

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

答案1

我需要在文件行的,末尾添加。1testing

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

相关内容