Install GCC For SuSE (rpm version]

Source: Internet
Author: User

1. Obtain the program
Cpp-3.3.3-43.24.i586.rpm

Glibc-devel-2.3.3-98.28.i586.rpm

Gcc-3.3.3-43.24.i586.rpm

Supplement the package according to the package missing during installation.

2. Prepare to install gcc
# Rpm-IVH gcc-3.3.3-43.24.i586.rpm
Error: Failed dependencies:
Glibc-devel is needed by gcc-3.3.3-43.24
CPP = 3.3.3-43.24 is needed by gcc-3.3.3-43.24

3. software required to install gcc
1) install glibc-devel

# Rpm-IVH glibc-devel-2.3.3-98.28.i586.rpm
Preparing... ######################################## ### [100%]
1: glibc-devel ##################################### ###### [100%]

2) install CPP

# Rpm-IVH cpp-3.3.3-43.24.i586.rpm
Preparing... ######################################## ### [100%]
Package cpp-3.3.3-43.41 (which is newer than cpp-3.3.3-43.24) is already installed
File/usr/bin/CPP from install of cpp-3.3.3-43.24 conflicts with file from package cpp-3.3.3-43.41
File/usr/lib/GCC-lib/i586-suse-linux/3.3.3/PC3 from install of cpp-3.3.3-43.24 conflicts with file from package cpp-3.3.3-43.41
File/usr/share/man/Man1/cpp.1.gz from install of cpp-3.3.3-43.24 conflicts with file from package cpp-3.3.3-43.41

We can find that the system has been installed with CPP, but the version conflict.

3) execute GCC Installation

# Rpm-IVH gcc-3.3.3-43.24.i586.rpm
Error: Failed dependencies:
CPP = 3.3.3-43.24 is needed by gcc-3.3.3-43.24

The system still cannot recognize CPP.

4) force Install Version cpp-3.3.3-43.24

# Rpm-IVH cpp-3.3.3-43.24.i586.rpm -- nodeps -- force
Preparing... ######################################## ### [100%]
1: CPP ####################################### #### [100%]

5) install GCC again

# Rpm-IVH gcc-3.3.3-43.24.i586.rpm
Preparing... ######################################## ### [100%]
1: GCC ####################################### #### [100%]

6) test gcc

# Which gcc
/Usr/bin/GCC

# VI test. c
The content of test. C is as follows:
# Include <stdio. h>
Main ()
{
Printf ("\ NGCC is OK! \ N ");
}
Compile test. c
# Gcc-O test. C-o Test
Generate the executable file test (which can be seen through the LS command)

Run Test
#./Test
Screen output
GCC is OK!
Indicates that the GCC program is correctly compiled.

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.