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.