我在我的环境中使用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 vagrant:

vagrant init hashicorp/bionic64

! 你需要删除旧的Vagrant文件。

Then

vagrant up

其他回答

试试这个,对我有用:

删除目录下所有的vagrants文件 ~# vagrant init——template——force 流浪汉起来了

完成了!

检查Vagrantfile中的以下条目

Every Vagrant development environment requires a box.
You can search for boxes at https://vagrantcloud.com/search.
  config.vm.box = "base"

这是使用vagrant init命令创建的默认文件设置。但你需要做的是用操作系统初始化流浪环境。例如$vagrant init centos/7。Vagrantfile看起来是这样的:

Every Vagrant development environment requires a box.
You can search for boxes at https://vagrantcloud.com/search.
  config.vm.box = "centos/7"

这将解决做流浪者时找不到基地的错误。

vagrant init laravel/homestead

然后

vagrant up

这对我很有效。

实际上,你需要做的是:

vagrant up laravel/homestead

因为根据你刚刚下载的宅基地攻略:http://laravel.com/docs/5.0/homestead 由:

vagrant box add laravel/homestead

所以你必须启动你想要使用的盒子-而不是一些随机的ubuntu图像;)

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

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

这对我很管用。

快乐的编码