質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

解決済

2回答

2969閲覧

vagrantでbox addで失敗するので.vagrand.dを削除してもうまくない件

momijiMac

総合スコア39

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

1クリップ

投稿2016/11/09 00:59

編集2016/11/10 23:43
  • 問題

以下のコマンドが実行できない

vagrant box add centos7 package.box

エラーメッセージ

An error occurred while downloading the remote file. The error

message, if any, is reproduced below. Please fix this error and try
again.

  • 試行錯誤状況

vagrantをアンインストールし,
再度インストールし直した。
~/.vagrant.dも削除
しかし、改善せず。

vagrant box add centos7 https://github.com/.../...

とやっても同じ症状

  • 解決したいこと

boxを追加したい。

  • 環境

vagrant 1.8.6
MacOS10.11.6

  • 追記

dockerをインストール
してからうまくないような気がする

  • 追記2

--debugオプションをつけてログを取ってみた。
Errorと関係あるところだけ抜き出してみた。

DEBUG subprocess: Exit status: 5

WARN downloader: Downloader exit code: 5
ERROR downloader: Exit code: 5

DEBUG box_add: Deleting temporary box:

ERROR warden: Error occurred: An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

INFO warden: Beginning recovery process...

INFO warden: Recovery complete.
INFO environment: Running hook: environment_unload
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 1 hooks defined.
INFO runner: Running action: environment_unload #Vagrant::Action::Builder:0x000001039e2808
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::DownloaderError: An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

ERROR vagrant: An error occurred while downloading the remote file. The error

message, if any, is reproduced below. Please fix this error and try
again.

ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.8.7/lib/vagrant/util/downloader.rb:206:in `execute_curl'

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

vagrant 1.8.7 に添付されている curl は壊れているそうなので

$ sudo rm /opt/vagrant/embedded/bin/curl

で削除するか

$ sudo ln -sf /usr/bin/curl /opt/vagrant/embedded/bin

で入れ替えてあげてください。

curl binary shipped with vagrant broken in OS X 10.12

投稿2016/11/11 00:04

編集2016/11/11 07:02
hana-da

総合スコア1728

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

ベストアンサー

他の問い合わせでもなぜか curlのコマンドでトラブルになっているようです。

$ which curl <--- デフォルト /usr/bin/curl vagrantのcurlの場所 /opt/vagrant/embedded/bin/curl

ではなくdockerをインストールした配下のパスが表示されていないでしょうか?

原因かも?

$ /opt/vagrant/embedded/bin/curl --version dyld: Library not loaded: @rpath/libcurl.4.dylib Referenced from: /opt/vagrant/embedded/bin/curl Reason: Incompatible library version: curl requires version 9.0.0 or later, but libcurl.4.dylib provides version 7.0.0

応急対応

https://github.com/mitchellh/vagrant/issues/7969 $ sudo mv /opt/vagrant/embedded/bin/curl{,.bak} /tmp/. (rmするのも不安なのでmvにしておく)

※参考情報 「Vagrant 1.8.7でvagrant upできないときの応急対応」
http://qiita.com/kotatsu360/items/554da271d6935622254b

投稿2016/11/10 13:25

編集2016/11/10 23:56
nagaetty

総合スコア1106

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

momijiMac

2016/11/10 23:47

$ which curl /usr/bin/curl でした。 追記2にError Logの抜粋を載せました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問