centos中安装 gcc编译器

1、查看系统

[root@centos7pc1 test3]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

 

[root@centos7pc1 test3]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core

 

2、测试gcc

[root@centos7pc1 test3]# gcc --version
bash: gcc: command not found...

 

3、安装gcc

[root@centos7pc1 test3]# yum install gcc gcc-c++ kernel-devel -y

 

4、测试

[root@centos7pc1 test3]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)      ## 没有问题
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 @   小鲨鱼2018  阅读(455)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示