3

centos 7をインストールしたばかりで、vagrantをインストールしようとしています。virtualbox をインストールした後、vagrant up を実行すると、次のようになります。

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 setup を実行すると、

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

不足しているパッケージは何ですか?

4

2 に答える 2

4

次の方法で「gcc」と「kernel-devel」をインストールする必要があります。

sudo yum install gcc kernel-devel

次に実行して、仮想ボックスを再コンパイルします。

sudo /etc/init.d/vboxdrv setup

あなたは今実行することができます:

vagrant up
于 2014-09-01T18:35:15.013 に答える