由于Vagrant的Box添加出现错误,我进行了处理
环境是指周围自然和人为的条件在某一时间范围内对人类、动植物和物体所产生的影响。
OS X El Capitan 10.11.6 就是指代 苹果电脑操作系统X版本为 El Capitan 的 10.11.6 版本。而 Vagrant 1.8.7 版本指的是软件 Vagrant 的 1.8.7 版本。
错误内容 (Error content)
当要向box添加bento/centos-7.1时出现了错误。
$ vagrant box add bento/centos-7.1
The box 'bento/centos-7.1' 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.1"]
Error:
原由
问题出在 issue #7969:https://github.com/mitchellh/vagrant/issues/7969。
Curl似乎有问题。
应对方法 chǔ fǎ)
$ sudo rm -rf /opt/vagrant/embedded/bin/curl
结果 (jié guǒ)
$ vagrant box add bento/centos-7.1
==> box: Loading metadata for box 'bento/centos-7.1'
box: URL: https://atlas.hashicorp.com/bento/centos-7.1
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.1' (v2.2.2) for provider: virtualbox
box: Downloading: https://atlas.hashicorp.com/bento/boxes/centos-7.1/versions/2.2.2/providers/virtualbox.box
==> box: Successfully added box 'bento/centos-7.1' (v2.2.2) for 'virtualbox'!
做成了。