CentOS下yum安裝缺少kernel-headers的解決方法
moon's blog 發(fā)布時(shí)間:2015-06-24 17:02:05 作者:佚名
我要評(píng)論

這篇文章主要介紹了CentOS下yum安裝缺少kernel-headers的解決方法,同時(shí)作者也給出了CentOS安裝軟件缺少包時(shí)的通用處理方法,需要的朋友可以參考下
centos出現(xiàn)Missing Dependency :kernel-header 的解決方法,在此記下
錯(cuò)誤信息如下:
復(fù)制代碼
代碼如下: glibc-headers-2.5-81.el5_8.2.x86_64 from updates has depsolving problems
--> Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
glibc-headers-2.5-81.el5_8.2.x86_64 from updates has depsolving problems
--> Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
Error: Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
Error: Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
--> Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
glibc-headers-2.5-81.el5_8.2.x86_64 from updates has depsolving problems
--> Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
Error: Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
Error: Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
安裝kernel-headers即可解決問題,如下
復(fù)制代碼
代碼如下:wget http://vault.centos.org/5.7/os/x86_64/CentOS/kernel-headers-2.6.18-274.el5.x86_64.rpm
rpm -ivh kernel-headers-2.6.18-274.el5.x86_64.rpm
rpm -ivh kernel-headers-2.6.18-274.el5.x86_64.rpm
同理,經(jīng)常會(huì)遇到linux下安裝軟件時(shí)提示少文件,如何知道所缺少的文件屬于哪個(gè)包?用什么命令查看?
例如:/lib/ld-linux.so.2: bad ELF interpreter: 沒有那個(gè)文件或目錄
如何判斷知道ld-linux.so.2文件屬于哪個(gè)包,知道后才能用yum安裝,使用如下命令:
復(fù)制代碼
代碼如下:yum provides "*/ld-linux.so.2"
相關(guān)文章
- 這篇文章主要介紹了CentOS下rpm包與yum安裝與卸載方法,需要的朋友可以參考下2015-05-22
- 今天deepvps不小心誤刪除了VPS下面的yum,大家都知道yum在linux中是很重要的一個(gè)功能,軟件的下載,系統(tǒng)的更新都要靠他。沒有yum,系統(tǒng)基本處于半殘廢狀態(tài)。2010-12-20
- yum是CentOS系統(tǒng)自帶的用于方便地添加/刪除/更新RPM包的工具,它能自動(dòng)解決包的倚賴性問題。 用yum更新PHP,只需用一條命令就可以搞定: #yum update php2008-09-08