2014-09-01 75 views
3

我剛安裝了centos 7,然後嘗試安裝vagrant。安裝VirtualBox的之後再顛沛流離,當我跑了漂泊不定,我得到:安裝vagrant時缺少centos 7的yum包裝

VirtualBox is complaining that the kernel module is not loaded. Please 
run `VBoxManage --version` or open the VirtualBox GUI to see the error 
message which should contain instructions on how to fix this error. 

我跑 「VBoxManage --version」 我得到錯誤

The vboxdrv kernel module is not loaded. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup 

我執行sudo /etc/init.d/vboxdrv設置和我得到

Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> 

什麼是缺少的軟件包?

回答

4

您必須安裝 「海灣合作委員會」 和 「安裝kernel-devel」 由:

sudo yum install gcc kernel-devel 

然後運行重新編譯虛框:

sudo /etc/init.d/vboxdrv setup 

你現在可以運行:

vagrant up 
1

步驟2對我不起作用:

sudo: /etc/init.d/vboxdrv: command not found 

發現這是在另一個線程工作得很好:

sudo /usr/lib/virtualbox/vboxdrv.sh setup 

希望能幫助它;)

相關問題