Vagrant报错,好像没有加载上Homestead的设置

另:在我的编辑器界面,报错都是红的,很显眼。但是我粘贴代码来论坛的时候,报错都是白色字了,请问贴代码的时候有什么小技巧吗,比较显眼的错误可能方便大家帮助我更快定位问题,谢谢。

Vagrant的问题感觉是一整套,启动也有问题,加载设置也有问题,具体如下:
1、vagrant up的时候,提示VirtualBox和VBoxService的版本号不一致。然后出了一个mount VirtualBox shared folder的错误。如下(不知道怎么设置颜色,我把其中的一些省略掉了):

➜  Homestead git:(master) ✗ vagrant reload
==> homestead: Attempting graceful shutdown of VM...
==> homestead: Checking if box 'laravel/homestead' version '12.2.0' is up to date...
.
.
.
==> homestead: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.34
VBoxService inside the vm claims: 6.1.36
Going on, assuming VBoxService is correct...
[homestead] GuestAdditions seems to be installed (6.1.36) correctly, but not running.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.34
VBoxService inside the vm claims: 6.1.36
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.34
VBoxService inside the vm claims: 6.1.36
Going on, assuming VBoxService is correct...
.
.
.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.34
VBoxService inside the vm claims: 6.1.36
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.34
VBoxService inside the vm claims: 6.1.36
Going on, assuming VBoxService is correct...
Restarting VM to apply changes...
.
.
.
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 uid=,gid=,_netdev vagrant /vagrant

The error output from the command was:

2、感觉vagrant虽然设置可能没有加载上,但是应该是起来了,所以我执行了vagrant ssh,可以正常登进去,但是出来了一个奇怪的提示,感觉是和之前的heroku有点啥关系似的

➜  Homestead git:(master) ✗ vagrant ssh
Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-124-generic x86_64)
* Homestead v13.2.1 | Thanks for using Homestead
* Settler v12.2.0

Last login: Mon Oct  3 01:16:44 2022 from 10.0.2.2
 ›   Warning: shellenv is not a heroku command.
Did you mean scale? [y/n]:  ›   Error: Run heroku help for a list of available commands.
vagrant@homestead:~$

3、现在浏览器输入larabbs.test,会进入homestead.test的首页,我猜是homestead.yaml的设置没有被加载上

sites:
    - map: homestead.test
      to: /home/vagrant/Code/Laravel/public
    - map: weibo.test
      to: /home/vagrant/Code/weibo/public
    - map: larabbs.test
      to: /home/vagrant/Code/larabbs/public

databases:
    - homestead
    - weibo
    - larabbs

4、尝试重新加载,直接报错

➜  Homestead git:(master) ✗ vagrant provision && vagrant reload
==> homestead: Running provisioner: file...
Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.
➜  Homestead git:(master)

求指点

本作品采用《CC 协议》,转载必须注明作者和本文链接
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 16

Vagrant 这个玩意竟还有人用,笨重容易出错,用 docker-desktop 或者 colima,或者使用 ddev。

2年前 评论
mshx 2年前
Helen2022 (楼主) 2年前
自由与温暖是遥不可及的梦想

楼主 你上图 不比你复制出来好?

上图我可能知道是啥

2年前 评论
Helen2022 (楼主) 2年前
Anoxia 2年前

颜色没有关系,你是不是装了两个版本的 vbox ?电脑是什么系统啊?
刚开始学习用 Homestead 没毛病,虽然重了点,但是是完整 Linux 系统,提供了完整工具,还有自动化部署脚本,开箱即用,可以在环境上少花很多时间折腾,还能熟悉 Linux。
其他那些 docker 之类的,还是在熟练之后再用。

2年前 评论
Helen2022 (楼主) 2年前
Helen2022 (楼主) 2年前
tomcath (作者) 2年前

windows可以直接用WSL2,不过环境需要自己安装,生命在于折腾 :joy:,多看文档 Homestead 还是挺好用的。

2年前 评论

升级大法好用,全部换成最新版本,所有问题,解决。。。。。

2年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!