如何解决升级到 3.19.7 内核时出现的 BUILD_EXCLUSIVE 错误?

如何解决升级到 3.19.7 内核时出现的 BUILD_EXCLUSIVE 错误?

我运行以下命令从 3.19.0 升级到 3.19.7:

$ cd /tmp

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.7-vivid/linux-headers-3.19.7-031907-generic_3.19.7-031907.201505062136_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.7-vivid/linux-headers-3.19.7-031907_3.19.7-031907.201505062136_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.7-vivid/linux-image-3.19.7-031907-generic_3.19.7-031907.201505062136_amd64.deb

$ sudo dpkg -i linux-headers-3.19.7-*.deb linux-image-3.19.7-*.deb

一切似乎都运行正常,但事情开始变得奇怪了:

Unpacking linux-image-3.19.7-031907-generic (3.19.7-031907.201505062136) ...
Setting up linux-headers-3.19.7-031907 (3.19.7-031907.201505062136) ...
Setting up linux-headers-3.19.7-031907-generic (3.19.7-031907.201505062136) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.19.7-031907-generic /boot/vmlinuz-3.19.7-031907-generic
Error!  The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch.  This indicates that it should not be built.
Error! Bad return status for module build on kernel: 3.19.7-031907-generic (x86_64)
Consult /var/lib/dkms/fglrx-updates/13.350.1/build/make.log for more information.

我不太明白它为什么会爆炸,我检查了 make.log 发现:

DKMS make.log for fglrx-updates-13.350.1 for kernel
3.19.7-031907-generic (x86_64) Thu May  7 23:59:48 EDT 2015 /usr/sbin/dkms: line 73: cd: /var/lib/dkms/fglrx/13.350.1/build: No such file or directory AMD kernel module generator version 2.1 doing Makefile based build for kernel 2.6.x and higher rm -rf *.c *.h *.o
*.ko *.a .??* *.symvers make -C /lib/modules/3.19.7-031907-generic/build SUBDIRS=/var/lib/dkms/fglrx-updates/13.350.1/build/2.6.x modules make[1]: Entering directory `/usr/src/linux-headers-3.19.7-031907-generic'   CC [M]  /var/lib/dkms/fglrx-updates/13.350.1/build/2.6.x/firegl_public.o /var/lib/dkms/fglrx-updates/13.350.1/build/2.6.x/firegl_public.c: In function ‘kasSetExecutionLevel’: /var/lib/dkms/fglrx-updates/13.350.1/build/2.6.x/firegl_public.c:4733:5: error: implicit declaration of function ‘__get_cpu_var’ [-Werror=implicit-function-declaration]
     orig_level = __get_cpu_var(kasExecutionLevel);
     ^ /var/lib/dkms/fglrx-updates/13.350.1/build/2.6.x/firegl_public.c:4734:38: error: lvalue required as left operand of assignment
     __get_cpu_var(kasExecutionLevel) = level;
                                      ^ cc1: some warnings being treated as errors make[2]: *** [/var/lib/dkms/fglrx-updates/13.350.1/build/2.6.x/firegl_public.o] Error 1 make[1]: *** [_module_/var/lib/dkms/fglrx-updates/13.350.1/build/2.6.x] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.19.7-031907-generic' make: *** [kmod_build] Error 2 build failed with return value 2

有任何想法吗?

谢谢!

答案1

我最终使用以下命令删除了所有文件。

sudo apt-get remove linux-headers-3.19.* linux-image-3.19.* && sudo update-grub

我恢复到了 3.18.-something。然后我执行了完全相同的步骤,似乎第二次就成功了。

不确定为什么会出现这个错误,但删除文件并重新开始有所帮助。

相关内容