如何修复fedora中内核和内核开发版本之间的不匹配?

时间:2014-03-20 21:26:34

标签: linux linux-kernel fedora

我有这样的偏好:

# yum info kernel|grep -E "Name|Version|Release"
Name        : kernel
Version     : 3.13.6
Release     : 200.fc20


# yum info kernel-devel
Installed Packages
Name        : kernel-devel
Arch        : i686
Version     : 3.11.10
Release     : 301.fc20
Size        : 31 M
Repo        : installed
From repo   : fedora
Summary     : Development package for building kernel modules to match the
            : kernel
URL         : http://www.kernel.org/
License     : GPLv2 and Redistributable, no modification permitted
Description : This package provides kernel headers and makefiles sufficient to
            : build modules against the kernel package.

Name        : kernel-devel
Arch        : i686
Version     : 3.13.6
Release     : 200.fc20
Size        : 31 M
Repo        : installed
From repo   : updates
Summary     : Development package for building kernel modules to match the
            : kernel
URL         : http://www.kernel.org/
License     : GPLv2 and Redistributable, no modification permitted
Description : This package provides kernel headers and makefiles sufficient to
            : build modules against the kernel package.

# uname -r
3.11.10-301.fc20.i686+PAE

所有已安装的软件包:

#rpm -qa | grep ^kernel
kernel-devel-3.13.6-200.fc20.i686
kernel-devel-3.11.10-301.fc20.i686
kernel-PAE-devel-3.11.10-301.fc20.i686
kernel-PAE-3.11.10-301.fc20.i686
kernel-headers-3.13.6-200.fc20.i686

当我尝试安装some_package.rpm时,它说内核和内核开发版本不同。 如何解决?

1 个答案:

答案 0 :(得分:2)

使用它来使内核版本与内核版本相同:

sudo yum install "kernel-devel-uname-r == $(uname -r)"