您的位置:首页 > 其它

Homestead 无法挂载共享目录解决方案

2015-10-22 18:50 621 查看
那么不废话。 我执行
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那一行即可。

热泪盈眶啊。



打个小广告: 装逼图片认准装逼大全
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  homestead vagrant