我使用了这里的信息How to install g++ 10 on Ubuntu 18.04? 在 Ubuntu 20 上安装 gcc/g++ 10 ,当我尝试再次执行此操作时:
sudo apt install g++-10
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-10 is already the newest version (10.2.0-5ubuntu1~20.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Run Code Online (Sandbox Code Playgroud)
但是当我询问版本时:
g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even …Run Code Online (Sandbox Code Playgroud)