那么不废话。 我执行 homestead up
。 虚拟机启动没问题、SSH连接没问题,但是到了挂载的时候报错:
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`,actimeo=1 home_vagrant_idagou /home/vagrant/idagou
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant`,actimeo=1 home_vagrant_idagou /home/vagrant/idagou
The error output from the last command was:
unknown mount option `actimeo=1'
valid options:
rw mount read write (default)
ro mount read only
uid =<arg> default file owner user id
gid =<arg> default file owner group id
ttl =<arg> time to live for dentry
iocharset =<arg> i/o charset (default utf8)
convertcp =<arg> convert share name from given charset to utf8
dmode =<arg> mode of all directories
fmode =<arg> mode of all regular files
umask =<arg> umask of directories and regular files
dmask =<arg> umask of directories
fmask =<arg> umask of regular files
然后我装了vagrant-vbguest, 重装了homestead, vagrant甚至virtual box.
但都没什么卵用
最后我尝试了一个一开始我觉得最不可能的方法:http://stackoverflow.com/questions/30175290/laravel-homestead-vagrant-vboxsf-not-available-issue (看第一个答案。)
我打开了AppData\Roaming\Composer\vendor\laravel\homestead\scripts\homestead.rb
找到了mount_opts
的位置然后将['actimeo=1']
改成了 ['']
。
然后homestead halt
, homestead up
。 一切就都OK了!
备选方案
homestead edit
然后检查folders项,看看type是不是给设置成nfs了。去掉type那一行即可。
热泪盈眶啊。
打个小广告: 装逼图片认准装逼大全