我遇到了一个问题,我不明白发生了什么。让我们看看我的命令:
root@cms:~# sudo apt-get install virtualbox-5.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
virtualbox-5.1 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@cms:~# /etc/init.d/vboxdrv status
VirtualBox kernel module is not loaded.
root@cms:~# /etc/init.d/vboxdrv setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:
apt-get install linux-headers-3.2.0-23-virtual
(The last command may fail if your system is not fully updated.)
apt-get install linux-headers-virtual
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
root@cms:~# apt-get install linux-headers-3.2.0-23-virtual
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.2.0-23-virtual
E: Couldn't find any package by regex 'linux-headers-3.2.0-23-virtual'
root@cms:~# apt-get install linux-headers-virtual
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-virtual is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
所以,我不明白,因为 virtualbox 说我需要 linux-headers-3.2.0.23-virtual 而 Linux 说它已经安装在系统上了。
如果我在 /boot/ 中列出标题,我只有 3.2.0.23 文件。
我使用的是 Ubnutu 14.04.5 LTS(几周前从 12.04 LTS 升级)。
编辑1
root@cms:~# apt-cache policy linux-headers-virtual
linux-headers-virtual:
Installed: 3.13.0.129.138
Candidate: 3.13.0.129.138
Version table:
*** 3.13.0.129.138 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
3.13.0.24.28 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
编辑2
root@cms:/tmp# apt-cache policy linux-virtual linux-image-virtual linux-generic linux-image-generic
linux-virtual:
Installed: (none)
Candidate: 3.13.0.129.138
Version table:
3.13.0.129.138 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
3.13.0.24.28 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
linux-image-virtual:
Installed: 3.13.0.129.138
Candidate: 3.13.0.129.138
Version table:
*** 3.13.0.129.138 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
3.13.0.24.28 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
linux-generic:
Installed: 3.13.0.129.138
Candidate: 3.13.0.129.138
Version table:
*** 3.13.0.129.138 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
3.13.0.24.28 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
linux-image-generic:
Installed: 3.13.0.129.138
Candidate: 3.13.0.129.138
Version table:
*** 3.13.0.129.138 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
3.13.0.24.28 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages