我在 Windows 8.1 (VirtualBox) 中运行 Ubuntu 16.04 作为客户系统,并尝试安装客户附加组件以激活 3D 加速。但是,我收到以下错误消息:
/var/log/vboxadd-install.log
grep: /lib/modules/4.4.0-104-generic/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.4.0-104-generic/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
sudo sh./VBoxLinuxAdditions.run:
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.28 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.28 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Starting the VirtualBox Guest Additions.
You may need to restart the Window System (or just restart the guest system)
to enable the Guest Additions.
我已采取的步骤:
安装最新的 Virtualbox 驱动程序 5.2.4
安装 linux-headers-generic
我如何知道我的内核版本是否受支持?我可以采取什么步骤?
➜ ~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
➜ ~ uname -r
4.4.0-104-generic
答案1
找到解决方案这里正如@N0rbert 所述,我安装了系统build-essential
,然后使用以下命令准备构建内核模块:
sudo apt update && sudo apt dist-upgrade
sudo apt install build-essential module-assistant dkms
sudo m-a prepare
我认为没有dist-upgrade
必要,也许就upgrade
足够了,但请根据你认为合适的方式使用它。
/usr/lib/nux/unity_support_test -p:
Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes
Unity 3D supported: yes