An error occurred when updating centos to install gcc

Source: Internet
Author: User

An error occurred when updating centos to install gcc

The reason is that GCC is installed on a trixbox.
Step 1: update the system software package to the latest
Yum-y update
After a long wait, reboot and run again
Yum-y update confirms that there are no updatable modules.

Next, install gcc
Yum-y install gcc
Unexpectedly
[Trixbox1.localdomain SRC] # Yum install gcc
Loading "installonlyn" plugin
Setting up install process
Setting up Repositories
Reading repository metadata in from local files
Excluding packages from CentOS-5-Base
Finished
Excluding packages from CentOS-5-Updates
Finished
Excluding packages from CentOS-5-Addons
Finished
Excluding packages from CentOS-5-extras
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package GCC. i386. 1.2-14. EL5 set to be updated
--> Running transaction check
--> Processing dependency: CPP = 4.1.2-14. EL5 for package: gcc
--> Processing dependency: Glibc-devel> = 2.2.90-12 for package: gcc
--> Processing dependency: libgomp = 4.1.2-14. EL5 for package: gcc
--> Processing dependency: libgomp. so.1 for package: gcc
--> Restarting dependency resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package libgomp. i386. 1.2-14. EL5 set to be updated
---> Package glibc-devel.i386 0: 2. 5-18.el5_1.1 set to be updated
---> Package CPP. i386. 1.2-14. EL5 set to be updated
--> Running transaction check
--> Processing dependency: Glibc-headers for package: Glibc-devel
--> Processing dependency: Glibc-headers = 2.5-18. el5_1.1 for package: Glibc-devel
--> Restarting dependency resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc-headers.i386 0: 2. 5-18.el5_1.1 set to be updated
--> Running transaction check
--> Processing dependency: Kernel-headers for package: Glibc-headers
--> Processing dependency: Kernel-headers> = 2.2.1 For package: Glibc-headers
--> Finished dependency resolution
Error: Missing dependency: Kernel-headers is needed by package glibc-headers
Error: Missing dependency: Kernel-headers> = 2.2.1 is needed by package glibc-headers
[Trixbox1.localdomain SRC] #
An error occurred. It seems that the kernel-headers is missing,
So, I try "yum install kernel-headers ":

 

[Trixbox1.localdomain SRC] # Yum install kernel-headers
Loading "installonlyn" plugin
Setting up install process
Setting up Repositories
Reading repository metadata in from local files
Excluding packages from CentOS-5-Base
Finished
Excluding packages from CentOS-5-Updates
Finished
Excluding packages from CentOS-5-Addons
Finished
Excluding packages from CentOS-5-extras
Finished
Parsing package install arguments
Nothing to do
[Trixbox1.localdomain SRC] #
Later I saw someone talking about the default CentOS-Base.repo does not contain the download of the kernel, it is true
Comment out exclude = kernel *
Run Yum-y update again. I rely on it to download another kernel package. Here is the culprit!
Execute Yum install GCC again. It should be okay!

In case anyone's wondering, I don't make a habit of talking to myself.

Related Article

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.