我在我的环境中使用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 add {title} {url}
 $ vagrant init {title}
 $ vagrant up

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

其他回答

发生这种情况是因为有一个没有定义框名的流浪文件。这种情况发生在你运行vagrant init时不带框名参数。

所以你必须删除流浪者的文件

vagrant init box-title
vagrant up

我希望这能有所帮助!

我在运行以下命令时也遇到了同样的问题

vagrant init
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: Box file was not detected as metadata. Adding it directly...
==> 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 /home/...../base

我用

>vagrant init laravel/homestead
>Vagrant up

这对我很管用。

快乐的编码

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

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

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

对我来说,这是以下几个步骤:

cd homestead(在您的目录homestead文件夹下)或cd homestead del vagrantfile或rm -Rf vagrantfile 流浪者在laravel/homestead 流浪汉了

vagrant init laravel/homestead

然后

vagrant up

这对我很有效。