我在我的环境中使用Vagrant,我遇到了一个小问题:

$vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
    default: Downloading: base

An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /Users/.../base

我已经初始化了我的项目与流浪者初始化,但出于某种原因流浪者拒绝工作。


当前回答

请在你的终端上运行:

$ vagrant box list

您将看到类似laravel/homestead(virtualbox,x.x.x)的内容。

接下来找到你的Vagrantfile,找到上面写着的那行

config.vm.box = "box"

运行流浪箱列表时,将箱替换为箱名。

其他回答

vagrant init laravel/homestead

然后

vagrant up

这对我很有效。

编辑vagrant init在同一目录下创建的vagrant文件,并在config.vm.box = "ubuntu/trusty64"行中输入盒子的名称,其中ubuntu/trusty64是你的基本盒子。现在vagrant up将下载并设置ubuntu/trusty64为你的基础框。

我也经历过这种错误。 我认为这是因为我没有提供一个box_url..

vagrant init precise64 http://files.vagrantup.com/precise64.box

在当前目录下,删除该目录下的所有vagrant文件,然后执行init,启动vagrant:

mv .vagrant .vagrant_old
mv Vagrantfile Vagrantfile_old

vagrant init ubuntu/trusty64  
vagrant up  

这个作品。

您也可以将vm添加到您的机器

vagrant box add precise32 http://files.vagrantup.com/precise32.box