Vagrant box could not be found error

拟墨画扇 提交于 2020-01-02 06:22:09

问题


I am trying to set up virtual machine using virtual box. I have got virtual box and vagrant installed in my windows 7 64-bit machine. I have also built an environment using puphpet. But whenever I try to install the box ubuntu1404-x64 it throws the error

Bringing machine 'machine1' up with 'virtualbox' provider...
==>Machine1: Box 'puphpet/ubuntu1404-x64' could not be found. Attempting to find and install...
machine1: Box Provider: virtualbox
machine1: Box Version: >= 0
machine1: Box file was not detected as metadata. Adding it directly...
machine1: Adding box 'puphpet/ubuntu1404-x64' (v0) for provider: virtualbox
machine1: Downloading: puphpet/boxes/ubuntu1404-x64
machine1:
An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.

I checked the URL https://atlas.hashicorp.com/puphpet/boxes/ubuntu1404-x64/ and the box puphpet/ubuntu1404-x64 does exist.

Also when it says The error message, if any, is reproduced below it does not show any description at the terminal.

I googled the issue, tried some of the answers here at stackoverflow but no result. Please help.


回答1:


I've had a similar situation in the past, and it helped me to download the box using vagrant command line, instead of having it be downloaded automatically ( from the URL in Vagrantfile ):

$ vagrant box add USER/BOX

see more here. Could you try the same approach? It might work for you as well.

EDIT: on a windows box, Microsoft Visual C++ 2010 redist looks to be needed to perform the provisioning of the box. It can be downloaded here. More info on the puhpet issuet: here




回答2:


I ran into a similar problem and fixed it by installing the latest version of vagrant.



来源:https://stackoverflow.com/questions/39325033/vagrant-box-could-not-be-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!