It is very easy to install using the yum command.
The command is as follows:
yum -y install gcc gcc-c++ kernel-devel //安装gcc、c++编译器以及内核文件
Recommended tutorial: centos usage tutorial
Manually install gcc
1. Install from CentOS7 system Remove the required rpm packages from the image (you can also obtain them through other methods): Unzip the image file and enter the "Packages" directory. There are many rpm packages in it. Take out the following ones:
2. Upload these packages to the system to be installed [Xftp can be installed for uploading], and execute the installation commands in the following order:
can also be used Install uniformly with the following command:
rpm -Uvh *.rpm --nodeps --force
Recommended related video tutorials: linux video tutorial
The above is the detailed content of How to install gcc on centos. For more information, please follow other related articles on the PHP Chinese website!