我在我的环境中使用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 init laravel/homestead

然后

vagrant up

这对我很有效。

其他回答

我知道这是旧的,但我得到了完全相同的错误。结果发现我遗漏了文档中清楚显示的这一步。

我需要编辑Vagrantfile,将config.vm.box设置为我下载的映像hashicorp/precise32。默认情况下,它被设置为base。

以下是文档的内容:

现在箱子已经添加到Vagrant,我们需要配置我们的 项目使用它作为基础。打开Vagrantfile并更改 内容如下: Vagrant.configure("2") do |config| Config.vm.box = "hashicorp/precise32" 结束

如果“Vagrantfile”已经在这个目录中存在。在运行“vagrant init”之前删除它。 错误显示

1. rm Vagrantfile
2. vagrant init hashicorp/precise64
3. vagrant up

如果您添加了一个方框并开始下载,但中断了下载,请转到~/.vagrant。删除部分下载文件,然后重试。

我通过访问。vagrant文件夹解决了这个问题。将文件夹名称从laravell - vagrantslash -homestead改为base。 这对我很有效。

请检查BIOS中是否启用了虚拟化。

创建虚拟框时遵循以下语法:

 $ vagrant box add {title} {url}
 $ vagrant init {title}
 $ vagrant up

参见http://www.vagrantbox.es/