1.8.7 fails to download or update boxes #7969

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

Projects

None yet
@austinbutler

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
fatmcgav commented Nov 7, 2016

Related to #7970 I believe...

@oullah
oullah commented Nov 7, 2016

Yeah the workaround stated in #7970 works

@jenhsun
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.

@pdurbin pdurbin referenced this issue in sbgrid/data-capture-module Nov 7, 2016
Closed

Document how to get geerlingguy/centos6 Vagrant box #7

@crock
crock commented Nov 7, 2016

@jenhsun thank you, that worked for me!

@akhomyakov

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
megahall commented Nov 7, 2016 edited

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
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!

@chrisroberts chrisroberts referenced this issue in mitchellh/vagrant-installers Nov 7, 2016
Merged

Replace rpath to remove if possible #98

@nathanloyer

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
DCorto commented Nov 8, 2016

I can confirm, the workaround worked for me too.

@chatterbeak

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
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
megahall commented Nov 9, 2016

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

@sdball
sdball commented Nov 11, 2016

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

@msabramo msabramo added a commit to msabramo/dcos-vagrant that referenced this issue Nov 11, 2016
@msabramo msabramo deploy.md: Add caveat about Vagrant 1.8.7
[Vagrant 1.8.7 has a problem with downloading boxes](mitchellh/vagrant#7969)
39650c8
@geerlingguy
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.

@teknogeek
teknogeek commented Nov 12, 2016 edited

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
mingp commented Nov 16, 2016 edited

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
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
danez commented Nov 21, 2016

Any news? When will 1.8.8 be released?

@maiorano84

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.

@skrenes skrenes referenced this issue in Varying-Vagrant-Vagrants/VVV Nov 23, 2016
Open

Trusty64 not found #354

@SpikesDivZero SpikesDivZero added a commit to SpikesDivZero/homebrew-cask that referenced this issue Nov 29, 2016
@SpikesDivZero SpikesDivZero Work around upstream bug in Vagrant 1.8.7
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.

mitchellh/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.
a959da1
@SpikesDivZero SpikesDivZero referenced this issue in caskroom/homebrew-cask Nov 29, 2016
Merged

Work around upstream bug in Vagrant 1.8.7 #27230

3 of 3 tasks complete
@fanquake fanquake added a commit to caskroom/homebrew-cask that referenced this issue Nov 29, 2016
@SpikesDivZero @fanquake SpikesDivZero + fanquake 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.

mitchellh/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.
8f731ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment