我刚刚偶然发现了一个问题,即安装的内核源与我实际运行的内核不匹配。
我在跑4.11.7-300.fc26.x86_64
:
[root@localhost VirtualBoxGuestAdditions]# uname -r
4.11.7-300.fc26.x86_64
但最新的内核源似乎没有相同的版本:
[root@localhost VirtualBoxGuestAdditions]# yum install kernel-devel
Last metadata expiration check: 1:30:50 ago on Wed 28 Jun 2017 04:11:01 PM CEST.
Package kernel-devel-4.11.6-301.fc26.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
毫无疑问/usr/src/kernels/
,我只有旧的资料来源:
[root@localhost VirtualBoxGuestAdditions]# ls -la /usr/src/kernels/
total 12
drwxr-xr-x. 3 root root 4096 Jun 28 16:22 .
drwxr-xr-x. 4 root root 4096 Jun 28 16:50 ..
drwxr-xr-x. 23 root root 4096 Jun 28 16:22 4.11.6-301.fc26.x86_64
所以我尝试手动指定版本,但没有成功:
[root@localhost VirtualBoxGuestAdditions]# yum install kernel-devel-4.11.7-300.fc26
Last metadata expiration check: 1:27:40 ago on Wed 28 Jun 2017 04:11:01 PM CEST.
No package kernel-devel-4.11.7-300.fc26 available.
Error: Unable to find a match
这是正常的吗?我现在该怎么办?
答案1
我认为这只是一个暂时的镜像问题。尝试
sudo dnf --refresh upgrade kernel-devel
(或者可能只是一个将军sudo dnf --refresh upgrade
。)