• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

vagrant box add失败

php 搞代码 3年前 (2022-01-25) 15次浏览 已收录 0个评论
文章目录[隐藏]

其实前段时间也出现过这个问题,后来以为是电脑的原因,不

!本文来源gaodai.ma#com搞##代!^码网(

搞gaodaima代码了了之了。
我装好virtualbox, vagrant,然后尝试vagrant box add laravel/homestead,失败;然后我尝试官方推荐的老方式vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead,还是失败,最后我把box下载下来,尝试本地添加vagrant box add laravel/homestead virtual.box,同样失败,并且三次报的错误都一样:

<code>D:\Homestead>vagrant box add laravel/homestead virtualbox.box==> box: Box file was not detected as metadata. Adding it directly...==> box: Adding box 'laravel/homestead' (v0) for provider:    box: Unpacking necessary files from: file://D:/Homestead/virtualbox.box    box:An error occurred while downloading the remote file. The errormessage, if any, is reproduced below. Please fix this error and tryagain.</code>

是不是虚拟机virtualbox的原因啊?是我没安装好还是版本的原因?
求大神告知!

回复内容:

其实前段时间也出现过这个问题,后来以为是电脑的原因,不了了之了。
我装好virtualbox, vagrant,然后尝试vagrant box add laravel/homestead,失败;然后我尝试官方推荐的老方式vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead,还是失败,最后我把box下载下来,尝试本地添加vagrant box add laravel/homestead virtual.box,同样失败,并且三次报的错误都一样:

<code>D:\Homestead>vagrant box add laravel/homestead virtualbox.box==> box: Box file was not detected as metadata. Adding it directly...==> box: Adding box 'laravel/homestead' (v0) for provider:    box: Unpacking necessary files from: file://D:/Homestead/virtualbox.box    box:An error occurred while downloading the remote file. The errormessage, if any, is reproduced below. Please fix this error and tryagain.</code>

是不是虚拟机virtualbox的原因啊?是我没安装好还是版本的原因?
求大神告知!

事实证明,google和stackoverflow才是猿类的好朋友。额,纯吐槽。
stackoverflow上有几个类似的问题,我用其中一个方法解决了,现贴出来,供有需要的小伙伴参考。

I downloaded
cUrl x64 with SSL
and replace it with the curl.exe provided by Vagrant.
In other words, I copied the curl.exe to
C:\HashiCorp\Vagrant\embedded\bin
Now it’s working perfectly

原文地址

中文的回答目前是找不到任何的解决方案的,后来用google在英文网站才能找到解决的方案:遇到连本地都不能add box的时候,要安装VS2010的运行库。vagrant的报错真是不科学,这种程度的错误提示,让人根本摸不着头脑。因为一般用vagrant的人基本都是开发者,基本的运行库都会安装上了一遍,新手遇到这种情况完全摸不着头脑,更别说用去google查翻好几页的答案。
原文地址


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:vagrant box add失败

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址