RedHatLinux9 install GCC

Source: Internet
Author: User
It's almost a semester to learn embedded system design and application. I haven't used GCC to compile a program, let alone other programming environments. The reason is that my system does not have GCC, I want to install one but I don't know how to install it. After Google's introduction, I found that it basically introduced the GCC in the form of source code installation. I didn't have GCC on my system, so gcc in the source code form cannot be installed. How can this problem be solved? There are two solutions: & nb

It's almost a semester to learn embedded system design and application. I haven't used GCC to compile a program, let alone other programming environments. The reason is that my system does not have GCC, I want to install one but I don't know how to install it. After Google's introduction, I found that it basically introduced the GCC in the form of source code installation. I didn't have GCC on my system, so gcc in the source code form cannot be installed. How can this problem be solved?
There are two solutions:
1. Install the disk;
2. reinstall the system. During installation, select the custom installation package, select GCC, or select full installation;
Iii. Install GCC (. rpm) in binary format)
The following describes how to install gcc in the binary format (it looks troublesome)
 
Determine in advance to install rhel9-compliant rpm, and find the following URL:
Http://mirrors.jtlnet.com/centos/4/apt/i386/RPMS. OS/
It is comprehensive and covers all the other RPMs required for gcc installation.

Note: The following $ indicates the terminal.
 
1) install gcc
Download: gcc-3.4.6-9.i386.rpm
$ Rpm-ivh gcc-3.3.2-6.i386.rpm
 
Warning: gcc-3.4.6-9.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Error: Failed dependencies:
Binutils> = 2.15.92.0.2-18 is needed by gcc-3.4.6-9.i386
Cpp = 3.4.6-9 is needed by gcc-3.4.6-9.i386
Glibc-devel> = 2.2.90-12 is needed by gcc-3.4.6-9.i386
Libgcc> = 3.4.6-9 is needed by gcc-3.4.6-9.i386
Suggested resolutions:
Glibc-devel-2.3.4-2.9.i386.rpm
 
Failed
Based on the error message --> 1---1-
 
 
1-1) Update binutils
Download: binutils-2.15.92.0.2-24.i386.rpm
$ Rpm-Uvh binutils-2.15.92.0.2-24.i386.rpm
 
1-2) Update cpp
Download: cpp-3.4.6-9.i386.rpm
$ Rpm-Uvh cpp-3.4.6-9.i386.rpm
 
1-3) Update libgcc
Download: libgcc-3.4.6-9.i386.rpm
$ Rpm-Uvh libgcc-3.4.6-9.i386.rpm
 
1-4) Update glibc-devel
Download: glibc-devel-2.3.4-2.39.i386.rpm
$ Rpm-ivh glibc-devel-2.3.4-2.39.i386.rpm
Warning: glibc-devel-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Error: Failed dependencies:
Glibc = 2.3.4-2.39 is needed by glibc-devel-2.3.4-2.39.i386
Glibc-headers is needed by glibc-devel-2.3.4-2.39.i386
Glibc-headers = 2.3.4-2.39 is needed by glibc-devel-2.3.4-2.39.i386
Suggested resolutions:
Glibc-headers-2.3.4-2.9.i386.rpm
 
Based on the error message ---> 1-4-1-1-4-2
1-4-1) Update glibc
Download: glibc-2.3.4-2.39.i386.rpm
$ Glibc-2.3.4-2.39.i386.rpm
Warning: glibc-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Error: Failed dependencies:
Glibc-common = 2.3.4-2.39 is needed by glibc-2.3.4-2.39.i386
 
According to the error message --> 1-4-1-1
1-4-1-1)
Download: glibc-common-2.3.4-2.39.i386.rpm
$ Rpm-Uvh glibc-common-2.3.4-2.39.i386.rpm
Warning: glibc-common-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Error: Failed dependencies:
Glibc-common = 2.3.4-2.9 is needed by (installed) glibc-2.3.4-2.9.i686
 
If an error occurs again, force update will not be used, and the rpm dependent on it will also be updated
$ Rpm-Uvh glibc-common-2.3.4-2.39.i386.rpm -- nodeps -- force
 
Returns 1-4-1)
$ Rpm-Uvh glibc-2.3.4-2.39.i386.rpm
 
1-4-2) install glibc-headers
Download: glibc-headers-2.3.4-2.39.i386.rpm
$ Rpm-ivh glibc-headers-2.3.4-2.39.i386.rpm
Warning: glibc-headers-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Error: Failed dependencies:
Kernel-headers is needed by glibc-headers-2.3.4-2.39.i386
Kernel-headers> = 2.2.1 is needed by glibc-headers-2.3.4-2.39.i386
Suggested resolutions:
Glibc-kernheaders-2.4-9.1.87.i386.rpm
 
Based on Error information ---> 1-4-2-1
 
1-4-2-1) install glibc-kernheaders
Download: glibc-kernheaders-2.4-9.1.100.EL.i386.rpm
$ Rpm-ivh glibc-kernheaders-2.4-9.1.100.EL.i386.rpm
 
Returns 1-4-2)
$ Rpm-ivh glibc-headers-2.3.4-2.39.i386.rpm
 
Returns 1-4)
$ Rpm-ivh glibc-devel-2.3.4-2.39.i386.rpm
 
Return 1)
$ Rpm-ivh gcc-3.4.6-9.i386.rpm
 
Installation complete,
$ Gcc-v
Display Information
Gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)

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.