ゆずめも

メモ的なブログです。主に勉強した事について書いてます。

vagrant box addしたらエラーが出た

vagrant使ってみようと思ってvagrant box add ~したんだけど
出かける用事があってMacbook閉じて、帰ってきて再開したらエラーになってできなかった

==> box: Loading metadata for box 'arnemertz/Xubuntu16.04'
    box: URL: https://atlas.hashicorp.com/arnemertz/Xubuntu16.04
==> box: Adding box 'arnemertz/Xubuntu16.04' (v1.0.0) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/arnemertz/boxes/Xubuntu16.04/versions/1.0.0/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

HTTP server doesn't seem to support byte ranges. Cannot resume.

解決策

$VAGRANT_HOMEを設定していなければ
$HOME/.vagrant.dにあるtmpを削除することで解決した

cd $HOME/.vagrant.d/tmp

# box〜を確認
ls

# boxファイルを削除
rm box〜

これで再度vagrant box add ~すれば再度ダウンロードできました(最初からになるけど)