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

1.8.7 fails to download or update boxes #7969

Closed
austinbutler opened this Issue Nov 7, 2016 · 19 comments

Comments

Projects
None yet
@austinbutler

austinbutler commented Nov 7, 2016

Just upgraded to 1.8.7 (via brew cask initially, but I've tried after a manual download and install from the website as well), and vagrant can't download or update boxes. The relevant log entry seems to be about curl.

DEBUG subprocess: stderr: 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
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 5
 WARN downloader: Downloader exit code: 5

Vagrant version

Vagrant 1.8.7

Host operating system

OS X 10.11.6

Guest operating system

Arch

Debug output

Not mine, but it's already posted and is the same:
https://groups.google.com/d/msg/vagrant-up/RdC6AXRWjQE/JEIHXiaxAgAJ

Expected behavior

Box added or updated from Atlas.

Actual behavior

Fails to download or update box.

The box 'ubuntu/trusty64' 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/ubuntu/trusty64"]
Error:

Steps to reproduce

  1. vagrant init ubuntu/trusty64
  2. vagrant up
@fatmcgav

This comment has been minimized.

Show comment
Hide comment
@fatmcgav

fatmcgav Nov 7, 2016

Related to #7970 I believe...

fatmcgav commented Nov 7, 2016

Related to #7970 I believe...

@oullah

This comment has been minimized.

Show comment
Hide comment
@oullah

oullah Nov 7, 2016

Yeah the workaround stated in #7970 works

oullah commented Nov 7, 2016

Yeah the workaround stated in #7970 works

@jenhsun

This comment has been minimized.

Show comment
Hide comment
@jenhsun

jenhsun Nov 7, 2016

I just sudo rm -rf /opt/vagrant/embedded/bin/curl and it works now. It's looked like vagrant can fall back to system's curl.

jenhsun commented Nov 7, 2016

I just sudo rm -rf /opt/vagrant/embedded/bin/curl and it works now. It's looked like vagrant can fall back to system's curl.

@crock

This comment has been minimized.

Show comment
Hide comment
@crock

crock Nov 7, 2016

@jenhsun thank you, that worked for me!

crock commented Nov 7, 2016

@jenhsun thank you, that worked for me!

@akhomyakov

This comment has been minimized.

Show comment
Hide comment
@akhomyakov

akhomyakov Nov 7, 2016

Same here. Identical problem was just rebuilding my system (moving to a new one, actually).
Googling around I saw some windows folks have this issue as well. Simply sudo rm /opt/vagrant/embedded/bin/curl solves the issue.

akhomyakov commented Nov 7, 2016

Same here. Identical problem was just rebuilding my system (moving to a new one, actually).
Googling around I saw some windows folks have this issue as well. Simply sudo rm /opt/vagrant/embedded/bin/curl solves the issue.

@megahall

This comment has been minimized.

Show comment
Hide comment
@megahall

megahall Nov 7, 2016

I did some further root cause analysis on this. It appears the embedded curl is not actually referencing the local (rpath) based libcurl.4.dylib. So it blows up for me on El Capitan. In my case I solved it by replacing the vagrant embedded copy of curl and curl-config with a bash script like so:

#!/bin/bash

unset DYLD_LIBRARY_PATH
unset LD_LIBRARY_PATH

/usr/local/opt/curl/bin/curl "$@"

I think the C build options provided to ./configure; make; make install for the Vagrant embedded tools are not right so the dynamic library linkages are bogus.

megahall commented Nov 7, 2016

I did some further root cause analysis on this. It appears the embedded curl is not actually referencing the local (rpath) based libcurl.4.dylib. So it blows up for me on El Capitan. In my case I solved it by replacing the vagrant embedded copy of curl and curl-config with a bash script like so:

#!/bin/bash

unset DYLD_LIBRARY_PATH
unset LD_LIBRARY_PATH

/usr/local/opt/curl/bin/curl "$@"

I think the C build options provided to ./configure; make; make install for the Vagrant embedded tools are not right so the dynamic library linkages are bogus.

@chrisroberts

This comment has been minimized.

Show comment
Hide comment
@chrisroberts

chrisroberts Nov 7, 2016

Collaborator

@megahall You are correct. I was tracking down the root cause today and found an issue with the install_name_tool usage that was causing the problem. Fix is being tested now, and should be merged in shortly. Cheers!

Collaborator

chrisroberts commented Nov 7, 2016

@megahall You are correct. I was tracking down the root cause today and found an issue with the install_name_tool usage that was causing the problem. Fix is being tested now, and should be merged in shortly. Cheers!

@nathanloyer

This comment has been minimized.

Show comment
Hide comment
@nathanloyer

nathanloyer Nov 7, 2016

Came across this issue just now after upgrading to 1.8.7, confirmed the workaround works for me as well.

Thanks for the quick response, hope to get the update soon :)

nathanloyer commented Nov 7, 2016

Came across this issue just now after upgrading to 1.8.7, confirmed the workaround works for me as well.

Thanks for the quick response, hope to get the update soon :)

@DCorto

This comment has been minimized.

Show comment
Hide comment
@DCorto

DCorto Nov 8, 2016

I can confirm, the workaround worked for me too.

DCorto commented Nov 8, 2016

I can confirm, the workaround worked for me too.

@VirtualAirwaves

This comment has been minimized.

Show comment
Hide comment
@VirtualAirwaves

VirtualAirwaves Nov 9, 2016

I'm having the exact same problem now on MacOS

It even fails when adding boxes manually:

$ vagrant box add centos-7-1-1 CentOS-7-x86_64-Vagrant-1610_01.VirtualBox.box

==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'centos/7' (v0) for provider: 
    box: Unpacking necessary files from: file:///Volumes/Projects/Projects/temp/CentOS-7-x86_64-Vagrant-1610_01.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.

(And there's no error message)

VirtualAirwaves commented Nov 9, 2016

I'm having the exact same problem now on MacOS

It even fails when adding boxes manually:

$ vagrant box add centos-7-1-1 CentOS-7-x86_64-Vagrant-1610_01.VirtualBox.box

==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'centos/7' (v0) for provider: 
    box: Unpacking necessary files from: file:///Volumes/Projects/Projects/temp/CentOS-7-x86_64-Vagrant-1610_01.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.

(And there's no error message)

@jenhsun

This comment has been minimized.

Show comment
Hide comment
@jenhsun

jenhsun Nov 9, 2016

@chatterbeak
Remember to remove /opt/vagrant/embedded/bin/curl like I said before. And do
$vagrant box add centos/7
That's it. It will show you options below:

1) libvirt
2) virtualbox
3) vmware_fusion
4) vmware_workstation

jenhsun commented Nov 9, 2016

@chatterbeak
Remember to remove /opt/vagrant/embedded/bin/curl like I said before. And do
$vagrant box add centos/7
That's it. It will show you options below:

1) libvirt
2) virtualbox
3) vmware_fusion
4) vmware_workstation
@megahall

This comment has been minimized.

Show comment
Hide comment
@megahall

megahall Nov 9, 2016

If you need to debug it in more detail use export VAGRANT_LOG=debug.

megahall commented Nov 9, 2016

If you need to debug it in more detail use export VAGRANT_LOG=debug.

@sdball

This comment has been minimized.

Show comment
Hide comment
@sdball

sdball Nov 11, 2016

I just ran into this issue as well. The workaround did the trick!

sdball commented Nov 11, 2016

I just ran into this issue as well. The workaround did the trick!

@geerlingguy

This comment has been minimized.

Show comment
Hide comment
@geerlingguy

geerlingguy Nov 11, 2016

Contributor

Please please please see about pushing out a 1.8.8 release ASAP. The number of issues and pings I'm getting about this is reaching a fever pitch, and I think I've now closed out at least twenty or so issues/tickets concerning this...

Until the next release, first-time use of Vagrant on macOS is broken if a user grabs the latest version.

Contributor

geerlingguy commented Nov 11, 2016

Please please please see about pushing out a 1.8.8 release ASAP. The number of issues and pings I'm getting about this is reaching a fever pitch, and I think I've now closed out at least twenty or so issues/tickets concerning this...

Until the next release, first-time use of Vagrant on macOS is broken if a user grabs the latest version.

@teknogeek

This comment has been minimized.

Show comment
Hide comment
@teknogeek

teknogeek Nov 12, 2016

this worked for me too 👍 .

Piggybacking off of what @geerlingguy said, this was the case for me too. I am persistent...but I am sure that many others are not. Definitely should see about getting this fixed ASAP as it is quite off-putting and not much out there besides this thread on what the problem is or how to fix it.

teknogeek commented Nov 12, 2016

this worked for me too 👍 .

Piggybacking off of what @geerlingguy said, this was the case for me too. I am persistent...but I am sure that many others are not. Definitely should see about getting this fixed ASAP as it is quite off-putting and not much out there besides this thread on what the problem is or how to fix it.

@mingp

This comment has been minimized.

Show comment
Hide comment
@mingp

mingp Nov 16, 2016

Just ran into this as well. The recommended workaround worked for me.

Thank you.

My concern is that, with default settings, there is no real indication of what actually happened during the failure. All it said was

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

with seemingly no further error message or context.

It was only when a co-worker recommended re-running with VAGRANT_LOG=debug that I started getting the actually relevant error message

DEBUG subprocess: stderr: 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

I hope that there can be a fix or at least some more informative messaging for future users who encounter this. As far as I know, I'm running pretty close to a vanilla out-of-the-box install of everything relevant (OSX, brew, Vagrant) and the Vagrantfile in question was working fine for other co-workers quite recently. That leads me to believe this error could be a pretty common occurrence, so I hope it can be addressed soon.

Thank you again.

mingp commented Nov 16, 2016

Just ran into this as well. The recommended workaround worked for me.

Thank you.

My concern is that, with default settings, there is no real indication of what actually happened during the failure. All it said was

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

with seemingly no further error message or context.

It was only when a co-worker recommended re-running with VAGRANT_LOG=debug that I started getting the actually relevant error message

DEBUG subprocess: stderr: 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

I hope that there can be a fix or at least some more informative messaging for future users who encounter this. As far as I know, I'm running pretty close to a vanilla out-of-the-box install of everything relevant (OSX, brew, Vagrant) and the Vagrantfile in question was working fine for other co-workers quite recently. That leads me to believe this error could be a pretty common occurrence, so I hope it can be addressed soon.

Thank you again.

@pzrq

This comment has been minimized.

Show comment
Hide comment
@pzrq

pzrq Nov 20, 2016

@chrisroberts I hate to post on a closed issue, but until Vagrant 1.8.8 is released there will continue to be many mac OS users who's first impression of Vagrant is "requires only minimal configuration and tweaking."

To the fortunate macOS users who stumble on this thread, I needed:

# Manually work around the curl issue 
# https://github.com/mitchellh/vagrant-installers/issues/98
sudo rm -rf /opt/vagrant/embedded/bin/curl

# Download a pre-built vagrant box
vagrant box add hashicorp/precise64

# Create the Vagrantfile
vagrant init

Then considering this, edit your Vagrantfile, specifically update:

  # config.vm.box = "base"                # Wrong, fix this line
  config.vm.box = "hashicorp/precise64"   # Correct, after update

Then finally you can get the candy:

vagrant up
vagrant ssh

Which confirms you have successfully ssh-d into a running Vagrant box:

Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
New release '14.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
vagrant@precise64:~$    

pzrq commented Nov 20, 2016

@chrisroberts I hate to post on a closed issue, but until Vagrant 1.8.8 is released there will continue to be many mac OS users who's first impression of Vagrant is "requires only minimal configuration and tweaking."

To the fortunate macOS users who stumble on this thread, I needed:

# Manually work around the curl issue 
# https://github.com/mitchellh/vagrant-installers/issues/98
sudo rm -rf /opt/vagrant/embedded/bin/curl

# Download a pre-built vagrant box
vagrant box add hashicorp/precise64

# Create the Vagrantfile
vagrant init

Then considering this, edit your Vagrantfile, specifically update:

  # config.vm.box = "base"                # Wrong, fix this line
  config.vm.box = "hashicorp/precise64"   # Correct, after update

Then finally you can get the candy:

vagrant up
vagrant ssh

Which confirms you have successfully ssh-d into a running Vagrant box:

Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
New release '14.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
vagrant@precise64:~$    
@danez

This comment has been minimized.

Show comment
Hide comment
@danez

danez Nov 21, 2016

Any news? When will 1.8.8 be released?

danez commented Nov 21, 2016

Any news? When will 1.8.8 be released?

@maiorano84

This comment has been minimized.

Show comment
Hide comment
@maiorano84

maiorano84 Nov 22, 2016

Issue also confirmed on a coworker's machine (OSX El Capitan). Rolled back to 1.8.6 to correct it, but we're also curious about any future releases that may address this.

maiorano84 commented Nov 22, 2016

Issue also confirmed on a coworker's machine (OSX El Capitan). Rolled back to 1.8.6 to correct it, but we're also curious about any future releases that may address this.

geerlingguy referenced this issue in geerlingguy/ansible-vagrant-examples Nov 24, 2016

fanquake added a commit to Homebrew/homebrew-cask that referenced this issue Nov 29, 2016

Work around upstream bug in Vagrant 1.8.7 (#27230)
Upstream issue is documented here, and the workaround is tested and working on
OS X Sierra. I do not have an older machine to test on, but curl's invocation
has been relatively stable over the years.

hashicorp/vagrant#7969

While I was working on this, Vagrant 1.9.0 was released. I'm not updating this
cask to 1.9.0 at this time to give it a few days for any potential issues to
shake out.

@GenPage GenPage referenced this issue Nov 30, 2016

Merged

Update vagrant to 1.9.0 #27240

3 of 3 tasks complete

@kamilchm kamilchm referenced this issue Dec 15, 2016

Merged

vagrant: 1.8.7 -> 1.9.1 #21173

4 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment