gpt4 book ai didi

linux - Ubuntu apt-get 找不到任何版本的 gcc 和 g++

转载 作者:太空宇宙 更新时间:2023-11-04 12:25:56 25 4
gpt4 key购买 nike

我试图在我的 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

我的机器怎么了?

最佳答案

您需要指向较旧的 Ubuntu 版本。

他们有 as seen here for gcc-4.9here for gcc-4.6 .

关于linux - Ubuntu apt-get 找不到任何版本的 gcc 和 g++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44720592/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com