Determining the installed version of gcc
On SLES, RHEL, and CentOS
To see whether
gcc is installed on SLES, RHEL, or CentOS, query for the gcc package as follows: rpm -q gccIf gcc version 4.8-5.3 is installed, you
will get a result similar to the following output: gcc-4.8-5.3 On Ubuntu
To
see whether
gcc is installed on Ubuntu, query for
the gcc package as follows: dpkg -l gccIf gcc version 4.8.2-1ubuntu4 is installed,
you will get a result similar to the following output: Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==========-=====================-================-===================
ii gcc 4:4.8.2-1ubuntu4 ppc64el GNU C compiler