Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a local box via "box add" fails with v1.8.0, succeeds with v1.7.4 #6725

Closed
i-am-david-fernandez opened this issue Dec 23, 2015 · 37 comments

Comments

@i-am-david-fernandez
Copy link

Attempting to add a local box to vagrant via box add (i.e., vagrant box add --name foobar ./blah.box) fails using Vagrant 1.8.0 with no specific error message other than the leader:

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

The exact same attempt using Vagrant 1.7.4 succeeds without issue.

A debug trace of the success with 1.7.4 can be found here, and a similar trace of the failure with 1.8.0 can be found here.

My environment is Windows 10, primarily via a Cygwin bash shell, but the error also occurs using the native cmd.exe shell. Vagrant is installed to the default location (C:\HashiCorp\Vagrant). I have tried many uninstall/install cycles switching between 1.7.4 and 1.8.0 (originally using C:\Program Files (x86)\HashiCorp\Vagrant as the install path) in an attempt to debug, each time with the same result.

I have tried with two different local box files and both fail in 1.8.0 and succeed in 1.7.4.

While the local box file is located on a different drive/partition to Vagrant (Vagrant on C:, boxfile on D:), this doesn't appear to be related to #6495 as I don't get the same error message ("Couldn't open file ...").

@sethvargo sethvargo added this to the 1.8.1 milestone Dec 23, 2015
@maonx
Copy link

maonx commented Dec 27, 2015

I spent much time to find a solution to fix an error about

vagrant box add name /path/to/box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

on win7 and vagrant1.8.1, but no ideas.
When I see this issue,I downloads vagrant1.7.4 , and box add success
thank you

PS: OSX 10.11 vagrant1.8.1 virtualbox5.0.12 box add success

@jstortz
Copy link

jstortz commented Dec 28, 2015

OSX 10.11.2
Vagrant: 1.8.1
VMWare Fusion 8.0.2

I can add boxes successfully. I downloaded a box from atlas.hashicorp.com and added and removed it several times to make sure. I can't comment on how this works when running on windows. But adding boxes appears to work with Vagrant 1.8.1 on OS X.

@ofcwork
Copy link

ofcwork commented Jan 8, 2016

Yes its true, its not possible to add box with vagrant 1.8.0 and 1.8.1 in windows as im getting errors.
so im using now vagrant 1.7.4. thank you people for posting this issue. i have used VBOX 5.0.12.

@ecirtap
Copy link

ecirtap commented Jan 8, 2016

Workaround: as an alternative to "vagrant box add", one can still add a local box using the vm.box_url setting within the box definition in the Vagrantfile AND use another workaround described in #6754 (missing DLLs).

Eg:

config.vm.define 'sandbox' do |box|
  box.vm.box = 'ubuntu-14-04-64'
  box.vm.box_url =  "file://c:/boxes/ubuntu-14-04-64.box" 
  ...

@jamesvl
Copy link

jamesvl commented Apr 6, 2016

Sorry to just add a "me too", but I'm still hitting the same issue on Win 10 x64, Vagrant 1.8.1.

@sethvargo sethvargo modified the milestones: 1.8.1, 1.8.2 May 29, 2016
@kurron
Copy link

kurron commented Jun 3, 2016

I'm also having this issue on a clean install of Windows 10 x64.

@jamesvl
Copy link

jamesvl commented Jun 4, 2016

I did find a solution - it's referenced in #6754 and mentioned above, but I missed it:

Install the VC++ 2010 redistributable and re-install Vagrant. Mine worked (both importing and downloading) after doing that.

@sethvargo sethvargo modified the milestones: 1.8.2, 1.8.4, 1.8.5 Jun 10, 2016
@waqarit
Copy link

waqarit commented Jul 11, 2016

Just installing Visual C++ 2010 solved my problem with win 8.1 and vagrant 1.8.1

@sethvargo sethvargo modified the milestones: 1.8.5, 1.8.6 Jul 19, 2016
@jasonwilliams
Copy link

jasonwilliams commented Jul 27, 2016

Going to...
http://landinghub.visualstudio.com/visual-cpp-build-tools

Downloading the Visual C++ build tools and installing (then restarting) fixed it for me.
Click custom installation and select win 10 SDK or win 8.1 SDK

@jvreeken
Copy link

I just had a simillar error on osx 10.12.1 and vagrant 1.8.7
Error was:

default: Downloading: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

I installed vagrant 1.8.6 and it worked...

@belaoulidris
Copy link

I just had a similar error on osx 10.12.1 and vagrant 1.8.7
had to downgrade to 1.8.6

@wchen9911
Copy link

wchen9911 commented Nov 18, 2016

+1, using 1.8.7, max osx 10.11.6

Going to downgrade to 1.8.6

@PierreMage
Copy link

+1, using 1.8.7, max osx 10.11.6
Succeeds with 1.8.6

@footearth
Copy link

+1, using 1.8.7, max osx 10.12.1

@jstortz
Copy link

jstortz commented Nov 18, 2016

same

+1, using 1.8.7, max osx 10.12.1

@tinyc-z
Copy link

tinyc-z commented Nov 19, 2016

same

+1, using 1.8.7, max osx 10.12.2 beta2

@johnypony3
Copy link

+1, using 1.8.7, osx 10.12.2 Beta
reverting back to 1.7.4 fixed it.

@nesheep5
Copy link

same

+1, using 1.8.7, osx 10.11,6

@DGulshan
Copy link

+1
macOS 10.12.1
1.8.7 didn't work, downgraded to 1.8.6 and it works.

@myungjae1
Copy link

+1

same using vagrant 1.8.7, macOS 10.12.1

@JohnsonMikeJ
Copy link

+1
mac OS X 10.11.6
1.8.7 didn't work for me either (local or remote box), downgraded to 1.8.6 and it worked just fine.

@nwqsshi
Copy link

nwqsshi commented Nov 25, 2016

+1
mac OS X 10.12.1
1.8.7 local or remote box can't work,use 1.8.6 it worked.

@bionara
Copy link

bionara commented Nov 25, 2016

Same as above - downgrading to 1.8.6 and it works fine. Adding the following [error] for anyone googling this problem:
vagrant box add
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

@dan-nl
Copy link

dan-nl commented Nov 26, 2016

mac os x 10.11.6
vagrant box add
vagrant 1.8.7 reproduces the error mentioned by the original issue comment
vagrant 1.8.6 runs without issue

@johnypony3
Copy link

hi, are there any news regarding this error?

@pascaloliv
Copy link

Same issue, I've downgraded my vagrant to 1.8.6 and it works !
https://releases.hashicorp.com/vagrant/1.8.6/

@teamamerica916
Copy link

Hey, just ran into this myself. It seems to be because the version of cURL that's embedded with vagrant is not compatible with system curl on mac OS. The error I get adding a box with VAGRANT_LOG=debug is:

Reason: Incompatible library version: curl requires version 9.0.0 or later, but libcurl.4.dylib provides version 7.0.0
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000

And manually overriding DYLD_LIBRARY_PATH=/usr/local/opt/curl/lib to point to a recent cURL still fails. For now downgrading seems to be best choice until they fix this.

If you need 1.8.7 you can manually override the embedded /opt/vagrant/embedded/bin/curl, move it to a backup, and symlink the normal /usr/bin/curl to that location.

@visamz
Copy link

visamz commented Nov 29, 2016

Same issue, I've downgraded my vagrant to 1.8.6 and it works !

1.8.7 has a big bug.....

@klancaster
Copy link

FWIW, same issue. Downgrading to 1.8.6 fixed the issue. Running OS X 10.12

@johnypony3
Copy link

This is resolved with the newest version: 1.9.0.
Previous work had 1.8.6 pinned locally.
I updated to 1.8.7 was again able to reproduce.
I updated to 1.9.0 error went away.

@aclarkd
Copy link

aclarkd commented Dec 2, 2016

mac 10.11.3 - this worked for me in vagrant 1.8.7

sudo rm -rf /opt/vagrant/embedded/bin/curl

https://github.com/DelightedD0D comment in #7997

@voronianski
Copy link

voronianski commented Dec 7, 2016

I had the same issue on OS X Yosemite and vagrant 1.8.7 then updated to vagrant 1.9.0 - issue is fixed! 🎉

@johnypony3
Copy link

Petition to close this issue?

@santoshhkumarr
Copy link

santoshhkumarr commented May 23, 2017

run this command "vagrant box add hashicorp/precise64".

@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests