環境
OSX 10.11.6
Vagrant 1.8.7
エラー内容
boxにbento/centos-7.2を追加しようとするとエラー
$ vagrant box add bento/centos-7.2
The box 'bento/centos-7.2' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/bento/centos-7.2"]
Error:
対処法
vagrant内のcurlに問題があるようなので、それを削除する。
curlが元から入っていればそっちを使うようになる。
sudo rm -rf /opt/vagrant/embedded/bin/curl
結果
途中まで動いたけれど、SSLRead()でエラー発生
$ vagrant box add bento/centos-7.2
==> box: Loading metadata for box 'bento/centos-7.2'
box: URL: https://atlas.hashicorp.com/bento/centos-7.2
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.
1) parallels
2) virtualbox
3) vmware_desktop
Enter your choice: 2
==> box: Adding box 'bento/centos-7.2' (v2.3.0) for provider: virtualbox
box: Downloading: https://atlas.hashicorp.com/bento/boxes/centos-7.2/versions/2.3.0/providers/virtualbox.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
SSLRead() return error -9806
tmpファイル内のbox...ディレクトリを削除して、
$ rm -rf ~/.vagrant.d/tmp/box*
再実行したらダウンロードできた。
$ vagrant box add bento/centos-7.2
==> box: Loading metadata for box 'bento/centos-7.2'
box: URL: https://atlas.hashicorp.com/bento/centos-7.2
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.
1) parallels
2) virtualbox
3) vmware_desktop
Enter your choice: 2
==> box: Adding box 'bento/centos-7.2' (v2.3.0) for provider: virtualbox
box: Downloading: https://atlas.hashicorp.com/bento/boxes/centos-7.2/versions/2.3.0/providers/virtualbox.box
==> box: Successfully added box 'bento/centos-7.2' (v2.3.0) for 'virtualbox'!