添加盒子时出现问题?

$ vagrant box add metadata.json
==> box: Loading metadata for box 'metadata.json'
    box: URL: file://D:/Laravel/metadata.json
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Invalid file://hostname/, expected localhost or 127.0.0.1 or none
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
最佳答案

我也遇到这个问题了,不是 Vagrant 版本的问题,用2.0.3也可以的,注意:

metadata.json 这个要写成对应的绝对路径,就可以了

5年前 评论
讨论数量: 24

我也遇到这个问题了,不是 Vagrant 版本的问题,用2.0.3也可以的,注意:

metadata.json 这个要写成对应的绝对路径,就可以了

5年前 评论
lmaster

@Qcg 在试一次,你是用的作者给的那个box么?

6年前 评论

@lmaster
Vagrant 版本 2.0.3
VirtualBox 5.2.8

6年前 评论
lmaster

@Qcg 不是,那个书中有一节是环境部署,提到 Laravel 开发环境部署

win部署

file
有一个box

6年前 评论

@lmaster 对 下载好啦 就是 执行下面那段指令的时候报错

6年前 评论
lmaster

@Qcg 你这个是下载远程文件出错。你的box是放到了D:/Laravel/ ?下面。

file
你都确定没问题?

6年前 评论

@lmaster


Administrator@SC-201803141430 MINGW64 /d/lt-homestead-3-0-0-2017082400
$ vagrant box add metadata.json
==> box: Loading metadata for box 'metadata.json'
    box: URL: file://D:/lt-homestead-3-0-0-2017082400/metadata.json
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Invalid file://hostname/, expected localhost or 127.0.0.1 or none

6年前 评论

@lmaster
应该是这个hostname 有问题,我百度了半天也不知道 vagrant 的 这个hostname 该怎么去设置

6年前 评论

用docker吧, 简单方便

6年前 评论
lmaster

奇怪你的为什么要联网呢。。。。。
这个样子你把
换5.26

file

换成2.02

file
试试。。。

6年前 评论
lmaster

file
这个是我的

6年前 评论
lmaster

我是win server 2016
按理说我们是一样的

6年前 评论

@lmaster
正好我下一个最新的 homestead 学习一下相关的环境搭建 最后还是感谢你的帮助

6年前 评论

@OneStep 有好的docker相关入门文档吗?

6年前 评论

我也是这个问题,装回2.0.2也没用,网上找了很多方法都没用为什么啊,别说我没看教程,我都照着来了好几遍,能不能给一个解决方案啊
tuyt@DESKTOP-CQ71T0G MINGW64 /e
$ vagrant box add homestead.json
==> box: Loading metadata for box 'homestead.json'
box: URL: file://E:/homestead.json
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Invalid file://hostname/, expected localhost or 127.0.0.1 or none

tuyt@DESKTOP-CQ71T0G MINGW64 /e
$ vagrant box add homestead.json
==> box: Loading metadata for box 'homestead.json'
box: URL: file://E:/homestead.json
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

6年前 评论

@maxotm 我的也是一直提示这个问题。。。win10系统

6年前 评论

@lmaster 似乎win10系统普遍都有这个问题

6年前 评论

@Qcg 我的解决了,和win10系统没关系

file
是下载的vagrant有问题,把这个卸载然后重新安装(用迅雷下载链接)。

file
最初我是在vagrant官网下载的,但是提示远程文件发生错误(和楼主一样的问题),后来在重新安装的时候发现百度盘链接下载的文件在解压缩时有问题。最后使用迅雷链接这个就ok了.....楼主可以试试

6年前 评论

安装 Vagrant 2.0.2 就可以解决这个问题了

6年前 评论

@sq_kaka 万分感谢
@maxotm 有解决办法了

6年前 评论

我也遇到这个问题了,不是 Vagrant 版本的问题,用2.0.3也可以的,注意:

metadata.json 这个要写成对应的绝对路径,就可以了

5年前 评论

@xungzhe 大神!解决了!后面的同学。如果出现这个问题,请采用@xungzhe 的方法。把metadata.json的路径用绝对路径。在git bash里面就可以成功了!

5年前 评论

问题

file

解决方法使用绝对路径

file

1年前 评论

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