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

1.8.7 fails to download or update boxes #7969

Closed
austinbutler opened this issue Nov 7, 2016 · 20 comments
Closed

1.8.7 fails to download or update boxes #7969

austinbutler opened this issue Nov 7, 2016 · 20 comments

Comments

@austinbutler
Copy link

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
Copy link
Contributor

fatmcgav commented Nov 7, 2016

Related to #7970 I believe...

@oullah
Copy link

oullah commented Nov 7, 2016

Yeah the workaround stated in #7970 works

@jenhsun
Copy link

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
Copy link

crock commented Nov 7, 2016

@jenhsun thank you, that worked for me!

@akhomyakov
Copy link

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
Copy link

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
Copy link
Member

@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
Copy link

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
Copy link

dcorto commented Nov 8, 2016

I can confirm, the workaround worked for me too.

@RobertSwirsky
Copy link

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
Copy link

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
Copy link

megahall commented Nov 9, 2016

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

@sdball
Copy link

sdball commented Nov 11, 2016

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

@teknogeek
Copy link

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
Copy link

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
Copy link

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
Copy link

danez commented Nov 21, 2016

Any news? When will 1.8.8 be released?

@maiorano84
Copy link

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 pushed a commit to Homebrew/homebrew-cask that referenced this issue Nov 29, 2016
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.
@ghost
Copy link

ghost commented Apr 3, 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 3, 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