我正在尝试让VirtualBox在内核3.2.0-49-generic
的ElementaryOS上运行。我一直在收到这个错误:
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-ose-dkms package and the appropriate
headers, most likely linux-headers-generic.
You will not be able to start VMs until this problem is fixed.
No protocol specified
No protocol specified
Failed to open the X11 display!
我搜索过并发现正在运行:
sudo dpkg-reconfigure virtualbox-dkms
sudo dpkg-reconfigure virtualbox
解决问题。
但是当我做sudo dpkg-reconfigure virtualbox-dkms
时。我收到这个错误:
------------------------------
Deleting module version: 4.1.12
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-4.1.12 DKMS files...
Building only for 3.2.0-49-generic
Building initial module for 3.2.0-49-generic
ERROR (dkms apport): kernel package linux-headers-3.2.0-49-generic is not supported
Error! Bad return status for module build on kernel: 3.2.0-49-generic (x86_64)
Consult /var/lib/dkms/virtualbox/4.1.12/build/make.log for more information.
现在我检查了make.log
文件,我发现了这个错误:
DKMS make.log for virtualbox-4.1.12 for kernel 3.2.0-49-generic (x86_64)
Thu Jul 18 05:57:58 EET 2013
make: Entering directory `/lib/modules/3.2.0-49-generic/build'
make: *** No targets specified and no makefile found. Stop.
make: Leaving directory `/lib/modules/3.2.0-49-generic/build
我不知道从这里应该做些什么。任何帮助将不胜感激。
答案 0 :(得分:1)
如果您在ls -l
文件夹中/lib/modules/3.2.0-49-generic/
,您会发现该版本是/usr/src/3.2.0-49-generic
目录的symbolic link
例如:
sagar.sakre@sagar-vm /lib/modules/3.2.0-23-generic $ ls -l
total 4412
lrwxrwxrwx 1 root root 39 Aug 6 2012 build -> /usr/src/linux-headers-3.2.0-23-generic
因此,请确保在/usr/src/
目录中包含已构建的源代码。如果问题仍然存在,请升级内核。
答案 1 :(得分:0)
我在通过apt-get安装虚拟机时遇到了同样的问题。所以我解决了下载oracle version of virtual box的问题。试一试:
删除虚拟框
sudo apt-get purge virtualbox
下载oracle网站上的虚拟框
https://www.virtualbox.org/wiki/Linux_Downloads
然后安装
sudo dpkg -i virtualbox-version...
我希望它适合你
答案 2 :(得分:0)
如果有人对Debian有相同的概率。
如果ls -lah显示这个
Makefile:2: config.mak: No such file or directory
Makefile:48: /common.mak: No such file or directory
Makefile:91: /libavutil/Makefile: No such file or directory
Makefile:91: /library.mak: No such file or directory
Makefile:168: /doc/Makefile: No such file or directory
Makefile:169: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
也许你和我有同样的问题
这解决了我的问题
toor@tr:/ ls -lah /lib/modules/3.2.0-4-486/
drwxr-xr-x 4 root root 4.0K Sep 22 2015 build
后
toor@tr:/ sudo mv /lib/modules/3.2.0-4-486/build /lib/modules/3.2.0-4-486/build.bak
toor@tr:/ sudo ln -s /usr/src/linux-headers-3.2.0-4-486 /lib/modules/3.2.0-4-486/build
toor@tr:/ ls -lah /lib/modules/3.2.0-4-486/
lrwxrwxrwx 1 root root 34 Jul 24 22:04 build -> /usr/src/linux-headers-3.2.0-4-486
它有效。
感谢这名男子 Sagar Sakre