linux系统(centos7)安装gcc命令包(解压缩版)
一、 如果执行gcc –version
出现以下信息,表示已经安装过gcc,可以跳过该步骤:
[boco@CDH-143 spark_job_monitor]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 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.
否则,如果执行make
命令报错误,说明系统上没有安装C语言环境,需要安装,在linux系统上的C环境是gcc,因此需要安装gcc。
二、gcc安装包下载
CentOS7系统
链接: | https://pan.baidu.com/s/1dCTQJZGtCuVzWqEjPsPKOg |
---|---|
提取码: | 7m73 |
1. 解压gcc.zip,编译安装 :
[root@CDH-143 soft]# unzip gcc.zip
[root@CDH-143 soft]# cd gcc
[root@CDH-143 soft]# rpm -Uvh *.rpm --nodeps --force
2.解压后如图:
3. 查看gcc版本,出现以下信息,表示安装成功
[boco@CDH-143 spark_job_monitor]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 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.
标签:gcc,143,CDH,4.8,centos7,压缩版,linux,安装
From: https://www.cnblogs.com/xiaoguo-java/p/17126361.html