我试图在我的Ubuntu虚拟机上编译一些C ++程序,它需要g ++ 4.9及更高版本。但是我发现这台机器上的g ++只有版本4.6.3,所以我尝试用这个命令更新g ++和gcc:
sudo apt-get install gcc='4.9' g++='4.9'
然后又回来了:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '4.9' for 'gcc' was not found
E: Version '4.9' for 'g++' was not found
奇怪的是,我尝试了另一个版本4.6,它也返回了相同的单词。
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '4.6' for 'gcc' was not found
E: Version '4.6' for 'g++' was not found
我的机器发生了什么事?