Linux【Centos】安装gcc
1、查看Linux是否安装GCC, 在终端中输入:gcc 或者 gcc -v
![image.png](https://upload-images.jianshu.io/upload_images/3341490-42a3073d978d812f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2、在终端输入:yum install gcc ,但是命令行提示没有root权限
![image.png](https://upload-images.jianshu.io/upload_images/3341490-cd414f2583c13e22.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3、修改输入的命令:sudo yum install gcc ,进行下载GCC
![image.png](https://upload-images.jianshu.io/upload_images/3341490-abc9bc21eebb95be.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4、然后按照提示框填入相应的值,下载需要的包
![image.png](https://upload-images.jianshu.io/upload_images/3341490-1f9398e6ee307461.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
5、验证是否安装成功:gcc -v
![image.png](https://upload-images.jianshu.io/upload_images/3341490-d77b1fe956187d88.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Linux 安装指定版本GCC方法:https://blog.csdn.net/liboyang71/article/details/77152577
Linux 下多版本gcc共存:https://blog.csdn.net/yuhuqiao/article/details/87776516
gcc下载地址:https://ftp.gnu.org/gnu/gcc/ 或者 https://gcc.gnu.org/releases.html