vagrant box add metadata.json==> box: Loading metadata for box 'metadata.json' box: URL: file://E:/xunleixiazia/lc-homestead-6.1.0-2018061700/metadata.jsonAn error occurred while downloading the remote file. The errormessage, if any, is reproduced below. Please fix this error and tryagain.Invalid file://hostname/, expected localhost or 127.0.0.1 or none复制代码
解决办法就是使用绝对路径。
$ vagrant box add E:/xunleixiazia/lc-homestead-6.1.0-2018061700/metadata.json==> box: Loading metadata for box 'E:/xunleixiazia/lc-homestead-6.1.0-2018061700/metadata.json' box: URL: file:///E:/xunleixiazia/lc-homestead-6.1.0-2018061700/metadata.json==> box: Adding box 'lc/homestead' (v6.1.0) for provider: virtualbox box: Downloading: virtualbox.box box:==> box: Successfully added box 'lc/homestead' (v6.1.0) for 'virtualbox'!复制代码