linux系统(centos7)安装gcc命令包(解压缩版)

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.
posted @ 2023-02-16 13:36  青喺半掩眉砂  阅读(283)  评论(1编辑  收藏  举报