てくてくあるく

WordPress の テーマ とか プラグイン に ついて 勉強しています

普段 Mac を 使っていて VirtualBox に Vagrant を 用いて 環境を サッと 作っていたんだが

新しい 環境を 作らなくといけなくなり vagrant up したら エラーが 起きて synced_folder が マウントできなくなった

普段は vagrant-vbguest が 勝手に Guest Additions を インストール してくれるのだが 今回は ちょっと 様子が違った…

An error occurred during installation of VirtualBox Guest Additions 5.2.12. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.

なんてエラーが出て 上手くインストールができなかったみたいだ…

==> default: Mounting shared folders...
    default: /var/www/html => /Users/jackrussell/repository/tekuaru/html

Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o dmode=777,fmode=777,uid=1000,gid=1000 var_www_html_ /var/www/html

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

ってな感じで 止まってしまいました


コンソールのログを眺めていたら

This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-693.21.1.el7.x86_64

ふむふむ ふむふむ ふむふむ って わかるかぁ!! ヽ(`Д´)ノ

というわけで グーグル翻訳してみたところ

このシステムは現在、カーネルモジュールを構築するように設定されていません。
現在のカーネルと一致するLinuxカーネル "ヘッダ"ファイルをインストールしてください
新しいハードウェアサポートをシステムに追加するためのものです。
ヘッダーを含む配布パッケージはおそらく次のとおりです。
    kernel-devel kernel-devel-3.10.0-693.21.1.el7.x86_64

とのこと

翻訳しても ちょっと 何言ってるかわからなかったので

とりあえず パッケージすべてを アップデートしてみます

vagrant$ vagrant ssh
[vagrant@tekuaru ~]$ sudo yum -y update
[vagrant@tekuaru ~]$ exit
vagrant$ vagrant reload

vagrant 環境に SSH 接続して yum update して 再起動!!

すると 無事 起動できましたとさ!!

Related Article

Vagrant で Mattermost を 立ち上げてみた

詳細へ »

今更だけど Vagrantで 開発環境 の ベースを 作ってみた ( 1 )

詳細へ »

今更だけど Vagrantで 開発環境 の ベースを 作ってみた ( 2 )

詳細へ »