LoginSignup
1
2

More than 5 years have passed since last update.

vagrant up 突然のエラー!

Posted at

いつものように vagrant up をしましたら
急にアップデートが走りましてマウントできなくなりました!

環境
VirtualBox
Vagrant
CentOS 7.2

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:

id -u apache

The error output from the command was:

id: apache: no such user

Google先生に助けを求めたところ.......
はい。みなさん一度は通るようですねwww

私の場合、いろいろ確認したところ
なぜかhttpdさんがお亡くなりになっていました

なぜお亡くなりになられたのかまでは調べ方がわからず不明なのです
↑知ってる方いたら教えてください(><;;;

で、上の意味はapacheなんてユーザいないぜって言ってるですが
Vagrantfileのマウントの設定でapacheを指定しているためにおこっているみたいです

# config.vm.synced_folder {host_path}, {guest_path}, option...
config.vm.synced_folder "./www/", "/home/{username}/www",
:owner => "apache",
:group => "apache",
:mount_options => ["dmode=775,fmode=775"]

ひとまず、オーナーとユーザをコメントアウトして再起動すると
正常に起動しました。

参考になったサイト
http://yukithm.blogspot.jp/2015/07/vagrant-apache.html

再度httpdをインストールしなおして

sudo yum -y install httpd

apacheが存在しているか確認

/etc/passwd

httpdの自動起動設定

systemctl start httpd
systemctl enable httpd

あれ?ほぼ作り直しじゃない?www
と思いつつ

念のためPHPの設定やらMYSQLの設定やら全部チェックしなおし。

一応 vagrant reload してエラーなく起動を確認した後に
Vagrantfileのマウントのオーナーとユーザを戻して再起動。
で無事、元通りになりました(;∀;`)ぶわぁっ

ネットで同じ状況になった記事を書いてくださった方々に感謝です
http://berukann.hatenablog.jp/entry/2016/01/24/163124
http://qiita.com/ooba1192/items/96b7ab25d2bda1676aaa
http://nori3tsu.hatenablog.com/entry/2014/03/22/123313
他多数

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2