OC:Windows 10。 无业游民:2.2.1。
我跑步:
vagrant box add laravel/homestead --provider virtualbox
并出现错误:
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://vagrantcloud.com/laravel/homestead
==> box: Adding box 'laravel/homestead' (v6.4.0) for provider: virtualbox
The "metadata.json" file for the box 'laravel/homestead' was not found.
Boxes require this file in order for Vagrant to determine the
provider it was made for. If you made the box, please add a
"metadata.json" file to it. If someone else made the box, please
notify the box creator that the box is corrupt. Documentation for
box file format can be found at the URL below:
https://www.vagrantup.com/docs/boxes/format.html
在此之前,我已经执行了此命令,我添加了该框,并且一切对我都有效,但是后来我决定通过vagrant box remove laravel/homestead
删除该框,然后再次添加。
答案 0 :(得分:0)
通过删除laravel-VAGRANTSLASH-homestead
目录中的~\.vagrant.d\boxes
文件夹解决了问题(我的情况是C:\Users\User\.vagrant.d\boxes
)。
此后,我成功运行:
$ vagrant box add laravel/homestead --provider virtualbox
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://vagrantcloud.com/laravel/homestead
==> box: Adding box 'laravel/homestead' (v6.4.0) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/laravel/boxes/homestead/versions/6.4.0/providers/virtualbox.box
box: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
box:
==> box: Successfully added box 'laravel/homestead' (v6.4.0) for 'virtualbox'!
我希望这对某人有帮助。