如何查看linux已安装的编译器及其版本

如题所述

第1个回答  2016-11-18
查看已安装:
RHEL, CentOS系列

$ rpm -qa | grep gcc
gcc-4.8.5-4.el7.x86_64
gcc-gfortran-4.8.5-4.el7.x86_64
libgcc-4.8.5-4.el7.x86_64
gcc-c++-4.8.5-4.el7.x86_64
Debian、Ubuntu系列
$ dpkg --list | grep gcc
ii gcc 4:4.4.5-1 The GNU C compiler
ii gcc-4.3 4.3.5-4 The GNU C compiler
ii gcc-4.3-base 4.3.5-4 The GNU Compiler Collection (base package)
ii gcc-4.4 4.4.5-8 The GNU C compiler
ii gcc-4.4-base 4.4.5-8 The GNU Compiler Collection (base package)
ii libgcc1 1:4.4.5-8 GCC support library本回答被网友采纳
相似回答