As5.4 install GCC and G ++

Source: Internet
Author: User

Download from the CD or on the website

Kernel-headers-2.6.18-164.el5.i386.rpm

Compat-glibc-headers-2.3.4-2.26.i386.rpm

Compat-glibc-2.3.4-2.26.i386.rpm

Compat-libstdc ++-33-3.2.3-61.i386.rpm

Compat-libf2c-34-3.4.6-4.i386.rpm
Compat-libgcc-296-2.96-138.i386.rpm
Cpp-4.1.2-46.el5.i386.rpm
Glibc-headers-2.5-42.i386.rpm
Glibc-devel-2.5-42.i386.rpm
Libgomp-4.4.0-6.el5.i386.rpm
Libstdc +-devel-4.1.2-46.el5.i386.rpm
Gcc-4.1.2-46.el5.i386.rpm
Compat-gcc-34-3.4.6-4.i386.rpm
Compat-gcc-34-c ++-3.4.6-4. i386.rpm

 

If it is a cd

Switch to the installation CD directory:
CD/Media
You can see the RHEL * directory and switch to this directory:
Cd rhel *
Run the following command:
Rpm -- import rpm-GPG-key-RedHat

Prepare the following *. RPM file (under the/Media/RHEL */Server/directory)

Add support for simplified and traditional Chinese characters. Run:
Rpm-IVH fonts-chinese-3.02-12.el5.noarch.rpm

To install the Chinese Input Method, run the following commands:

Rpm-IVH scim-libs-1.4.4-41.el5.i386.rpm
Rpm-IVH scim-1.4.4-41.el5.i386.rpm
Rpm-IVH scim-chinese-standard-0.0.2-1.el5.i386.rpm
Rpm-IVH scim-tables-0.5.6-7.i386.rpm
Rpm-IVH scim-tables-chinese-0.5.6-7.i386.rpm
Rpm-IVH scim-pinyin-0.5.91-16.el5.i386.rpm

 

Now we start to install the * RPM program on which GCC depends:
1. Prepare the following *. RPM file (under the/Media/RHEL */Server/directory ).
Http://riksun.riken.go.jp/pub/pub/Linux/slc/slc52/i386/yum/testing/
There are many *. RPM program files, which are very rich. Please check the version:

Kernel-headers-2.6.18-164.el5.i386.rpm

Compat-glibc-headers-2.3.4-2.26.i386.rpm

Compat-glibc-2.3.4-2.26.i386.rpm

Compat-libstdc ++-33-3.2.3-61.i386.rpm

Compat-libf2c-34-3.4.6-4.i386.rpm
Compat-libgcc-296-2.96-138.i386.rpm
Cpp-4.1.2-46.el5.i386.rpm
Glibc-headers-2.5-42.i386.rpm
Glibc-devel-2.5-42.i386.rpm
Libgomp-4.4.0-6.el5.i386.rpm
Libstdc +-devel-4.1.2-46.el5.i386.rpm
Gcc-4.1.2-46.el5.i386.rpm
Compat-gcc-34-3.4.6-4.i386.rpm
Compat-gcc-34-c ++-3.4.6-4. i386.rpm

Then, you must execute the following commands in sequence:

Rpm-IVH kernel-headers-2.6.18-164.el5.i386.rpm

Rpm-IVH compat-glibc-headers-2.3.4-2.26.i386.rpm

Rpm-IVH compat-glibc-2.3.4-2.26.i386.rpm

Rpm-IVH compat-libstdc ++-33-3.2.3-61.i386.rpm

Rpm-IVH compat-libf2c-34-3.4.6-4.i386.rpm
Rpm-IVH compat-libgcc-296-2.96-138.i386.rpm
Rpm-IVH cpp-4.1.2-46.el5.i386.rpm
Rpm-IVH glibc-headers-2.5-42.i386.rpm
Rpm-IVH glibc-devel-2.5-42.i386.rpm
Rpm-IVH libgomp-4.4.0-6.el5.i386.rpm
Rpm-IVH libstdc ++ devel-4.1.2-46.el5.i386.rpm
Rpm-IVH gcc-4.1.2-46.el5.i386.rpm
Rpm-IVH compat-gcc-34-3.4.6-4.i386.rpm
Rpm-IVH compat-gcc-34-c ++-3.4.6-4. i386.rpm

Run gcc-V to check the version.

[Root @ localhost server] # gcc-V

Use built-in specs.

Goals: i386-redhat-linux
Configuration:
../Configure -- prefix =/usr -- Mandir =/usr/share/man -- infodir =/usr/share/info
-- Enable-shared -- enable-threads = POSIX -- enable-checking = release -- With-system-zlib
-- Enable-_ cxa_atexit -- disable-libunwind-exceptions -- enable-libgcj-Multifile
-- Enable-languages ages = C, C ++, objc, obj-C ++, Java, Fortran, ADA -- enable-Java-AWT = GTK
-- Disable-DSSI -- enable-plugin -- With-Java-home =/usr/lib/JVM/java-1.4.2-gcj-1.4.2.0/JRE
-- With-CPU = generic -- Host = i386-redhat-linux
Thread model:
POSIX
GCC version 4.1.2 20080704 (Red Hat 4.1.2-46)

Install g ++

Rpm-IVH libstdc ++-devel-4.1.2-48.el5.x86_64.rpmrpm-IVH gcc-C ++-4.1.2-48. el5.x86 _ 64.rpm

View the G ++ version

[Root @ localhost server] # G ++-V
Use built-in specs.

Goals: i386-redhat-linux
Configuration: ../configure -- prefix =/usr
-- Mandir =/usr/share/man -- infodir =/usr/share/info -- enable-shared
-- Enable-threads = POSIX -- enable-checking = release -- With-system-zlib
-- Enable-_ cxa_atexit -- disable-libunwind-exceptions -- enable-libgcj-Multifile
-- Enable-languages ages = C, C ++, objc, obj-C ++, Java, Fortran, ADA -- enable-Java-AWT = GTK
-- Disable-DSSI -- enable-plugin -- With-Java-home =/usr/lib/JVM/java-1.4.2-gcj-1.4.2.0/JRE -- With-CPU = generic
-- Host = i386-redhat-linux
Thread model: POSIX
GCC version 4.1.2 20080704 (Red Hat 4.1.2-46)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.