要检查CentOS上的GCC版本,您可以在终端中使用以下命令:
gcc --version
这将显示已安装的GCC版本以及其他相关信息。例如,输出可能类似于:
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.
在这个例子中,GCC版本是4.8.5。