Ubuntu如何安装最新版安装gcc

2021-07-17  本文已影响0人  无味wy

安装GCC Compiler Ubuntu 18.04
1.首先更新包列表:

sudo apt update

2.安装build-essential软件包

sudo apt install build-essential

3.要验证GCC编译器是否已成功安装,请使用gcc --version命令打印GCC版本

gcc --version

因为ubuntu linux 默认的GCC版本为7.4所以输出的结果应该是

gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
Copyright © 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
上一篇下一篇

猜你喜欢

热点阅读