Ich habe hunger


vagrant upしたら、「Vagrant::Errors::LinuxMountFailed」ってエラーが出たときの対処

vagrant upした時、下記のようなエラーが出てました。

Vagrant::Errors::LinuxMountFailed: Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

sshログインして、sudo /etc/init.d/vboxadd setupでリビルド。

vagrant ssh
Last login: Mon Jun 22 06:57:40 2015 from
[vagrant@localhost ~]$ sudo /etc/init.d/vboxadd setup
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
The gcc utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-504.23.4.el6.x86_64

Building the main Guest Additions module                   [失敗]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions              [  OK  ]


sudo yum install -y kernel-devel-2.6.32-504.23.4.el6.x86_64


もともとVagrantfileで指定していたshared_folderをきちんと初めにupする時に設定していたことが悪かったのかな?とか思って、一旦悩んだ結果vagrant destroy。これで、同じ問題が起こったら、ゼロから始めてみることにする。