Rpm chapter for GCC Installation

Source: Internet
Author: User

Summary:

There are four methods to install gcc

1. When installing Linux distribution, choose to install GCC (this is the simplest)

2. If the GCC is not installed in step 1, install it without reinstalling it.LinuxIs the RPM method.

Third, in the previous method, you must note that the selected RPM should be the same as your Linux distribution version. If you cannot find it, you can use the srpm method, which is a method between rpm and source code installation. It is used to generate the corresponding rpm version in your Linux distribution environment, use the generated rpm for Installation

Fourth, install the source code. You need to compile the source code before installing it. Therefore, the premise is that at least one GCC can be used in its own environment. It is not suitable for initial installation of GCC in a system without GCC.

Rpm chapter

This is similar to installing software in windows. It is a compiled installation package that contains software dependencies.You can use rpm-ivh xxx. RPM to complete the installation. Rpm-e XXX. rpm can be removed and uninstalled on Windows.

Note the following:

1. if some GCC libraries, such as libgcc, are installed on your own system, but the GCC environment is not complete, the installation of the RPM about GCC will not be possible due to software dependency issues. Therefore, it is necessary to check the installed RPM in advance.

Rpm-Qa

Rpm-Qa libgcc

......

Therefore, the subsequent RPM installation must be consistent with the libgcc version. (Due to this, I have been tossing about GCC installation for a long time. I only remembered it when I saw the error prompt. My libgcc library is too old. The GCC installation package I downloaded is newer than this version)

2. This is a supplement to the first point. Is the installation principle of all RPM. View your Linux distribution version.

CAT/etc/issue

Because the RPM files released by different distributions cannot be used in other distributions. For example, an RPM file released by Red Hat cannot be directly installed on SuSE. Furthermore, different versions of the same distribution cannot communicate with each other. For example, RPM files of centos 4.x cannot be directly applied to centos 5.x.


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


Rpm conclusion: the dependency principle of RPM is tough. Pay attention to it. There are advantages and disadvantages. Although it helps me check this dependency, it is time-consuming to install it for the first time.

1. The environment where the software file is installed must beAndEnvironment Requirements for non-packaging are consistentOrEquivalent;
2. Dependency attribute requirements of software must be met;
3. Be careful when installing the anti-installation software.NoYou can remove it first, otherwise it may cause problems in the entire system!(This is similar to the principle of house demolition, from top to bottom)

After installation:

  You can use gcc-V to view the assembly installation environment for source code installation.


For more RPM commands, refer to Chapter 23rd of Linux-laruence's Linux private dish BASICS (Third edition.



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.