GCC installation RPM Chapter

Source: Internet
Author: User

General statement:

There are 4 different ways to install GCC

First, when installing the Linux distribution, choose to install GCC. (The simplest of these things)

Second, if not installed in the first step, to install GCC, without reloading Linux on the premise of the simplest is the RPM way

Third, the previous way to note the use of the RPM to be the same as their own Linux distribution version. If you can't find it, you can use the srpm method, which is a way of installing in RPM and source code to produce the corresponding RPM version in your own Linux distribution environment, and then use the RPM to install

Four, is the source code installation way. The source code needs to be compiled and then installed. So the premise is to have at least one usable gcc in its own environment. It is not appropriate to install GCC for the first time in a system without GCC.


RPM Chapter

This is a similar way to install software in Windows. is a compiled installation package that contains a software dependencies description. With Rpm-ivh xxx.rpm, the installation can be completed. Rpm-e xxx.rpm can be removed and uninstalled on Windows.

But the following points need to be noted:

1. If your own system installs some of GCC's libraries, such as LIBGCC, but does not have a full GCC environment, the risk of installing RPM for GCC will not be installed because of software dependencies issues. So it is necessary to check the installed RPM beforehand.

Rpm-qa

Rpm-qa LIBGCC

......

So then install subsequent RPM to match this LIBGCC version. (Because of this, the author installs GCC toss most of the day, the last look at the error prompted to remember that my LIBGCC library is too old, I downloaded the GCC installation package than this version of the new)

2. This is a supplement to the 1th. is the installation principle of all RPM. View your own version of the Linux distribution.

Cat/etc/issue

Because the RPM files usually released by different distribution can not be used on other distributions. For example, the RPM files released by Red Hat are usually not installed directly on the SuSE. Furthermore, there is no interoperability between different versions of the same distribution, such as CentOS 4.x RPM files cannot be applied directly to CentOS 5.x.


Give a corresponding version of the URL under the http://vault.centos.org/3.9/os/i386/RedHat/RPMS/


RPM Summary: The principle of the RPM dependencies are very frustrating people, to pay attention to. Disadvantages Although it helps me check this dependency, it is time-consuming to install it for the first time.

1. The software file installation environment must be consistent with or equivalent to the environmental requirements when not packaged;
2. Need to meet the requirements of software dependent attributes;
3. Anti-installation needs special care, the bottom of the software can not be removed first, otherwise it may cause the whole system problems. (This is similar to a layer of demolition of the house principle, from the top down)

After the installation of the harvest:

Gcc-v can be used to view the installation of accessories environment for the source code installation.


More about the RPM function commands can refer to the "linux-Bird's Linux Private Kitchen Basic Learning Chapter (Third edition)" 23rd.






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.