Linux method to check whether gcc has been installed: execute the [gcc -v] command. If the gcc compiler is not installed on the Linux system, it will prompt [Command not found]. If the gcc compiler is installed on the system, It will display which version of the gcc compiler is currently installed.
【Recommended related articles: linux tutorial】
How to check whether gcc has been installed on Linux:
Execute the gcc -v
command. If the gcc compiler is not installed on the Linux system, a prompt will appear. "Command not found".
1. If the gcc compiler is installed on the system, this command will display which version of the gcc compiler is currently installed. As follows:
2. If the command cannot be found, it means it is not installed, as follows:
Extended information:
Necessary matters for installing GCC:
GCC can be used to compile programs in C/C, FORTRAN, Java, OBJC, ADA and other languages. You can choose according to your needs. Install supported languages.
Before installation, a compiler such as cc or gcc must be available in the system, or use the environment variable CC to specify the compiler on the system. GCC 4.1.2 cannot be installed from source if the compiler is not present on the system. If this is the case, you can find a GCC software package in binary form such as RPM that is suitable for the system on the Internet to install and use.
The original GCC compiler on the system may store gcc and other command files, library files, header files, etc. in different directories in the system.
Unlike this, GCC now recommends installing a version of GCC in a separate directory. The advantage of this is that you can easily delete the entire directory when you no longer need it in the future (because GCC does not have an uninstall function); the disadvantage is that you need to do some setup work after the installation is completed to make the compiler work properly.
The above is the detailed content of How to check whether gcc is installed in linux. For more information, please follow other related articles on the PHP Chinese website!