vagrant laravel / box无法连接/解包

时间:2016-01-22 12:59:35

标签: laravel vagrant homestead vagrant-windows

我试图在Win 8.1上安装laravel / homestead

我安装了Virtualbox 5.0.14。 我也安装了Vagrant 1.8.1。

我尝试使用Laravel docs how-to,我也阅读了几十个教程和疑难解答,包括YouTube视频教程和Stack Overflow帖子。

没有运气。

这是我试过的:

    来自Laravel Homestead网站的
  1. 命令:
  2. $ vagrant box add laravel/homestead
    
    //I got this error
    PS U:\laravel> vagrant box add laravel/homestead
    The box 'laravel/homestead' could not be found or
    could not be accessed in the remote catalog. If this is a private
    box on HashiCorp's Atlas, please verify you're logged in via
    `vagrant login`. Also, please double-check the name. The expanded
    URL and error message are shown below:
    URL: ["https://atlas.hashicorp.com/laravel/homestead"]
    
    1. 我想:也许它与我的网络,防火墙等有关,所以我尝试了另一种方法并在我的本地驱动器上下载了最新的virtualbox.box:/ laravel
    2. curl -O -L  https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.0/providers/virtualbox.box
      

      然后我尝试从本地档案中运行宅基地:

      vagrant box add laravel/homestead ./virtualbox.box
      
      //I also tried: vagrant box add laravel/homestead U:/laravel/virtualbox.box
      
      //I got this error:
      ==> 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://U:/laravel/virtualbox.box
          box:
      An error occurred while downloading the remote file. The error
      message, if any, is reproduced below. Please fix this error and try
      again.
      
      1. 然后我试了一下:
      2. PS U:\laravel> vagrant init laravel/homestead
        A `Vagrantfile` has been placed in this directory. You are now
        ready to `vagrant up` your first virtual environment! Please read
        the comments in the Vagrantfile as well as documentation on
        `vagrantup.com` for more information on using Vagrant.
        PS U:\laravel> vagrant up
        Bringing machine 'default' up with 'virtualbox' provider...
        ==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
            default: Box Provider: virtualbox
            default: Box Version: >= 0
        The box 'laravel/homestead' could not be found or
        could not be accessed in the remote catalog. If this is a private
        box on HashiCorp's Atlas, please verify you're logged in via
        `vagrant login`. Also, please double-check the name. The expanded
        URL and error message are shown below:
        
        URL: ["https://atlas.hashicorp.com/laravel/homestead"]
        
        1. 如果上面没有工作,我尝试做同样的事情,但是从本地下载的virtualbox.box:
        2. PS U:\laravel> vagrant init laravel/homestead ./virtualbox.box
          A `Vagrantfile` has been placed in this directory. You are now
          ready to `vagrant up` your first virtual environment! Please read
          the comments in the Vagrantfile as well as documentation on
          `vagrantup.com` for more information on using Vagrant.
          PS U:\laravel> vagrant up
          Bringing machine 'default' up with 'virtualbox' provider...
          ==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
              default: Box Provider: virtualbox
              default: Box Version: >= 0
          ==> default: Box file was not detected as metadata. Adding it directly...
          ==> default: Adding box 'laravel/homestead' (v0) for provider: virtualbox
              default: Unpacking necessary files from: file://U:/laravel/virtualbox.box
              default:
          An error occurred while downloading the remote file. The error
          message, if any, is reproduced below. Please fix this error and try
          again.
          

          我也尝试过(只是为了看看是否有任何安装):

          $ vagrant init hashicorp/precise64
          $ vagrant up
          

          ......没有运气。

          我确保我在正确的目录中工作 - 起初我在C:驱动器(OS-win81所在的位置)上尝试了dir,但我也尝试了完全不同的驱动器U: 再说一遍......没有运气。

          我尝试了命令提示符,PowerShell,GIT Bash ......只是确保这不是问题。 我也试过用它们作为管理员。再一次,运气不大。

          哦,我尝试用source forge替换原来的bsdtar.exe。

          我甚至使用WinRAR解压缩virtualbox.box(直到元素文件)并使用ZIP打包,然后尝试从本地压缩文件中添加框。

          再次......没有运气。

          任何人遇到类似的问题并设法解决这个难题?

1 个答案:

答案 0 :(得分:0)

Jeffz,有很多原因导致你没有成功安装。我可能无法完成所有这些操作,但我将指导您完成有助于使Homestead运行的步骤。请按照以下步骤操作离线框:

  • 从地图册下载框后,您将获得hc-download文件,如果要重命名为virtualbox.box
  • 按照CMD中的以下命令安装此框:
  

vagrant box add laravel / homestead file:///Path/to/the/virtualbox.box

来源:https://abbasharoon.me/laravel-homestead-windows-extremely-easy/