LoginSignup
3
6

More than 5 years have passed since last update.

vagrant box add が出来ない・・・(新しいPCに開発環境構築)

Last updated at Posted at 2016-05-10

開発機で使用していた環境を新しいPCに作ってたのだが

vagrant box add が上手く行かない

症状は以下

C:\work\VM\CentOS>vagrant box add CentOS ./package.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'CentOS' (v0) for provider:
box: Unpacking necessary files from: file://C:/work/VM/CentOS/package.box
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

「An error occurred while downloading the remote file.」
上記のエラーメッセージで検索して
以下記事を見たのだが
http://qiita.com/circled9/items/0bef6c6b5855ae189a49
「up」時であって「add」では無いね。
そもそも「~/.vagrant~~」とか出来て無いし
自分の求めてるのと症状違うよね・・・

「vagrant box 追加 エラー」
で再度検索

http://blog.naba.biz/entry/2016/01/19/220230
これですね。
たぶん間違いない。

https://www.microsoft.com/ja-jp/download/details.aspx?id=5555
Microsoft Visual C++ 2010 再頒布可能パッケージ
が足りないらしい。2010に拘る必要ないと思うが

記事どおりにcurl.exe叩いたら同様のメッセージ出るし。
よしよし64bitOSだから64bit版をDLして試すもcurl.exe動かず
記事見ると32,64、両方入れたとか書いてあるし
しょうがなくx86をDLインスト。curl.exe動きました。
32bit版が正解らしい。

vagrant box add も成功しました。
add時の画面はLOG垂れ流しで消えたのでlistを以下

C:\work\VM\CentOS>vagrant box list
CentOS (virtualbox, 0)

参考記事に書いて在るけどLOGの出し方は
set VAGRANT_LOG=DEBUG

ちなみに、開発機にはVSとか色々入れてたのでVC++ライブラリが入っていて気づかなかった模様。

3
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
6