Installing gcc on RedHat is free of charge. You have read several methods on the Internet, and all of them are final. The installation was successful. I wrote an article to share it. Background: Download The RedHatEnterpriseLinux5 CD image from the Internet, put the image file on disk D, and then install RedHat directly from the hard disk. After the installation is complete, install gcc again. In fact, there is a gcc rpm package in the image file. The following describes how to obtain and install gcc-related files from the image file. First
Installing gcc on Red Hat is free of charge. You can check several methods on the Internet. The installation was successful. I wrote an article to share it.
Background: Download the CD image of Red Hat Enterprise Linux 5 from the Internet, put the image file on disk D, and install Red Hat directly from the hard disk. After installation, install gcc again.
In fact, there is a gcc rpm package in the image file. The following describes how to obtain and install gcc-related files from the image file.
First, how do I read image files? On the VM in the VMware menu bar, choose Removable devices> CD/DVD (IDE)> settings. Then, in the displayed dialog box (as shown in ), click CD/DVD on the left, select your iso file on the right, and click OK. Then Removable devices-> CD/DVD (IDE)-> connect will display the RHEL/5.6 i386 DVD icon on the desktop, then you can read the files in iso. Double-click the icon to enter the folder. Select the client folder, which contains the files required for installation.
Next, go to the terminal interface and install gcc. Copy the installed file to a directory, for example, my:
Mkdir/mnt/CD % create a directory to store the files to be installed
And then copy the gcc-4.1.2-50.el5.i386.rpm to the CD directory, in fact there are many files to install before installing gcc, but you do not have to know, the system will remind you. Next, enter:
Rpm-ivh gcc-4.1.2-50.el5.i386.rpm carriage return
The system will prompt you which file to install first, then you will find it in the client folder, copy it to the CD folder, and install it one by one.
Note: The commands used during installation are as follows:
Cd/mnt/CD
Rpm-ivh kernel-headers-2.6.18-238.el5.i386.rpm
Rpm-ivh glibc-headers-2.5-58.i386.rpm
Rpm-ivh glibc-devel-2.5-58.i386.rpm
Rpm-ivh gcc-4.1.2-50.el5.i386.rpm