在linux系统下或者Centos7/Red Hat7企业版系统里如何安装gnu下的GCC编译器以及相关的工具呢?(autoconf,automake,flex,c++ compiler)
你需要安装包含下面的软件包的基本开发工具环境,那么就会自动安装好我们想要装gcc编译器:
- autoconf
- automake
- binutils
- bison
- flex
- gcc
- gcc-c++
- gettext
- libtool
- make
- patch
- pkgconfig
- redhat-rpm-config
- rpm-build
- rpm-sign
输入下面的命令安装基本工具开发包:
1
|
#
yum group
install “Development Tools
"
|
下一步可以用whereis gcc这个命令来验证是否安装成功:
1
2 3 |
[root
@devops ~
]
# whereis gcc
gcc: /usr /bin / gcc /usr /lib / gcc /usr /libexec / gcc /usr /share /man /man1 /gcc.1.gz [root @devops ~ ] # |
或者通过gcc家–version选项来查看gcc的版本号:
1
2 3 4 5 |
[root@devops ~]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.8.2-16) Copyright (C) 2010 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. |