如何解决CentOS下yum安装缺少kernel-headers的问题
这篇文章主要介绍"如何解决CentOS下yum安装缺少kernel-headers的问题",在日常操作中,相信很多人在如何解决CentOS下yum安装缺少kernel-headers的问题问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答"如何解决CentOS下yum安装缺少kernel-headers的问题"的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
centos出现Missing Dependency :kernel-header 的解决方法,在此记下
错误信息如下:
代码如下:
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
安装kernel-headers即可解决问题,如下
代码如下:
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
同理,经常会遇到linux下安装软件时提示少文件,如何知道所缺少的文件属于哪个包?用什么命令查看?
例如:/lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录
如何判断知道ld-linux.so.2文件属于哪个包,知道后才能用yum安装,使用如下命令:
代码如下:
yum provides "*/ld-linux.so.2"
到此,关于"如何解决CentOS下yum安装缺少kernel-headers的问题"的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注网站,小编会继续努力为大家带来更多实用的文章!