Vagrant on Ubuntu: can't find any boxes

2019-08-05 13:52发布

问题:

I am trying to use vagrant on Ubuntu.

I just tried to init vagrant like documented here (https://vagrantcloud.com/ubuntu/boxes/ubuntu-15.04-snappy-core-edge-amd64):

vagrant init ubuntu/ubuntu-15.04-snappy-core-edge-amd64
vagrant up --provider virtualbox

I always get the error message:

* The box 'ubuntu/ubuntu-15.04-snappy-core-edge-amd64' could not be found.

Same error with any other boxes.

Referring to this question: Getting The box 'hashicorp/precise32' could not be found on firing 'vagrant up' from terminal in ubuntu, I need to edit my Vagrantfile and enter the url of the box.

But I tried URLs like

config.vm.box_url = "http://files.vagrantup.com/ubuntu-15.04-snappy-core-edge-amd64"

and

config.vm.box_url = "http://files.vagrantup.com/ubuntu/ubuntu-15.04-snappy-core-edge-amd64"

I always get a http 404 not found error. I just need the correct URL, maybe I need to do more than this...

回答1:

The vagrant version installed using

apt-get install vagrant

was 1.4.3, but 1.5 or later was required.

The quickest way to install the latest version is: Downloading the Debian Version (32bit or 64bit) from https://www.vagrantup.com/downloads.html