如何下載 vagrant 鏡像?

如何下載 vagrant 鏡像?

我想使用box-cutter/debian77,但是當我嘗試時

vagrant box add box-cutter/debian77 https://atlas.hashicorp.com/box-cutter/debian77

我明白了

Downloading box from URL: https://atlas.hashicorp.com/box-cutter/debian77
Extracting box...e: 0/s, Estimated time remaining: --:--:--)
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

怎麼了?我已經安裝了所有歸檔程式(unar、bsdtar、bzip2,...)

或哪裡可以手動下載圖片?

我在 Ubuntu 14.10 上使用 Vagrant 1.4.3。相同的指令適用於使用 arch 的朋友以及 debian wheezy

答案1

我認為您提供的 URL 是網頁的 URL,而不是 tarball。你只需要這樣做:

vagrant box add box-cutter/debian77

答案2

您需要安裝較新的 vagrant 版本。

我嘗試了 vagrant 1.6.5 並且它有效。

看來需要1.5,參見:https://github.com/coreos/coreos-vagrant/issues/112#issuecomment-43425522

相關內容