vagrant box add laravel/homestead /Users/user/Downloads/virtualbox.box #virtualbox.box存放的位置

  

cd ~
git clone https://github.com/laravel/homestead.git Homestead

  

cd Homestead
bash init.sh

  

vagrant up

可能会报: homestead-7: Box 'laravel/homestead' could not be found. Attempting to find and install...

原因:下载回来的virtualbox.box虽然是5.0的,但是在vagrant box list 中显示为 0 在下载回来的homestead默认的配置中就会出现错误
解决方法:
在Homestead\scripts\文件夹中,打开homestead.rb文件
把

config.vm.box_version = settings["version"] ||= ">= 5.0.0"
改为

config.vm.box_version = settings["version"] ||= ">= 0"

  

重新构建 可用 vagrant destroy    删除box    vagrant box remove  boxname

mysql默认用户账号  用户名:homestead  密码:secret

 

备注:尽量使用最新版本的 vagrant 和 virtualbox

不要用 vagrant init   新生成的Vagrantfile 中没有加载homestead.yaml 文件  会出现很多问题

相关文章:

  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2021-09-30
  • 2021-08-28
  • 2022-02-17
猜你喜欢
  • 2021-11-04
  • 2021-05-21
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
相关资源
相似解决方案