我正在使用 安装 vagrant sudo apt-get install
。我收到以下错误:
...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Setting up virtualbox (4.1.18-dfsg-1ubuntu1.2) ...
* Stopping VirtualBox kernel modules [ OK ]
* Starting VirtualBox kernel modules
* No suitable module for running kernel found [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up vagrant (1.0.3-1) ...
Processing triggers for ureadahead ...
Setting up virtualbox-dkms (4.1.18-dfsg-1ubuntu1.2) ...
Loading new virtualbox-4.1.18 DKMS files...
First Installation: checking all kernels...
Building only for 3.8.0-030800-generic
Building initial module for 3.8.0-030800-generic
ERROR (dkms apport): kernel package linux-headers-3.8.0-030800-generic is not supported
Error! Bad return status for module build on kernel: 3.8.0-030800-generic (x86_64)
Consult /var/lib/dkms/virtualbox/4.1.18/build/make.log for more information.
* Stopping VirtualBox kernel modules [ OK ]
* Starting VirtualBox kernel modules
* No suitable module for running kernel found [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up virtualbox-qt (4.1.18-dfsg-1ubuntu1.2) ...
Processing triggers for menu ...
Ubuntu 12.10
$ uname -a
Linux 3.8.0-030800-generic #201302181935 SMP Tue Feb 19 00:36:19 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
答案1
如果 Ubuntu 12.10 存储库中的 VirtualBox 版本不支持内核版本 3.8,您可以尝试使用 Oracle 存储库安装最新版本的 VirtualBox。较新版本的 VrtualBox 支持较新的内核。
添加其存储库的说明如下:
https://www.virtualbox.org/wiki/Linux_Downloads
请注意,您可能需要先卸载当前的 VirtualBox 和 Vagrant 包。另请注意,Oracle VirtualBox 包的名称不同。
然后,在安装 Vagrant 时,您需要阻止它删除新版本的 VirtualBox。您可以尝试通过从 Ubuntu 存储库安装 Vagrant 但--no-install-recommends
在运行时添加来执行此apt-get
操作,或者您可以尝试直接从他们的网站下载并安装 Vagrant: