How to check whether gcc is installed in linux

coldplay.xixi
Release: 2020-08-31 15:26:49
Original
13795 people have browsed it

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.

How to check whether gcc is installed in linux

【Recommended related articles:linux tutorial

How to check whether gcc has been installed on Linux:

Execute thegcc -vcommand. 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:

How to check whether gcc is installed in linux

2. If the command cannot be found, it means it is not installed, as follows:

How to check whether gcc is installed in linux

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!