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

embedded libcurl provides out-of-date version #7970

Closed
gerardkok opened this issue Nov 7, 2016 · 6 comments
Closed

embedded libcurl provides out-of-date version #7970

gerardkok opened this issue Nov 7, 2016 · 6 comments

Comments

@gerardkok
Copy link

gerardkok commented Nov 7, 2016

Vagrant version

1.8.7

Host operating system

Mac OS X 10.11.6

Guest operating system

Ubuntu 16.04.1

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "xenial64"
  config.vm.box_url = "https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box"

  config.vm.provider "virtualbox" do |vb|
    vb.name = LOCAL_VM_NAME
    vb.customize ["modifyvm", :id, "--memory", "2048"]
  end

  $bootstrap_script = <<SCRIPT
if [ ! -e "~/fixed_tty" ] ; then
  cat /root/.profile |grep -v mesg > TMP_profile
  echo 'if `tty -s`; then mesg n; fi' >> TMP_profile
  mv TMP_profile /root/.profile
  touch ~/fixed_tty
fi

SCRIPT
  config.vm.provision :shell, :inline => $bootstrap_script

end

Debug output

<script src="https://gist.github.com/gerardkok/7184612c30ca727252f94a5f2e4ec2fc.js"></script>

Expected behavior

Vagrant should have downloaded the box

Actual behavior

Vagrant couldn't download the box

Steps to reproduce

  1. vagrant up

Workaround

Part of the debug output suggests there's something wrong with the bundled curl binary:

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

Linking /opt/vagrant/embedded/bin/curl to OS X's curl binary (ln -s /usr/bin/curl /opt/vagrant/embedded/bin/curl) seems to fix this, and downloads the box correctly.

@fatmcgav
Copy link
Contributor

fatmcgav commented Nov 7, 2016

Just been hit by the same in conjunction with vagrant-puppet-install

Workaround get's it working again, but would be good to get a fix...

@gjherbiet
Copy link

gjherbiet commented Nov 7, 2016

I have followed the suggested workaround (both with the system cURL from /usr/bin/curland the Homebrew keg-only curl from /usr/local/opt/curl/bin/curl and I now get a different error:

DEBUG subprocess: stderr: dyld: Symbol not found: _iconv
  Referenced from: /usr/lib/libcups.2.dylib
  Expected in: /opt/vagrant/embedded/lib/libiconv.2.dylib
 in /usr/lib/libcups.2.dylib

Below are the corresponding cURL versions:

$ /usr/bin/curl -V
curl 7.49.1 (x86_64-apple-darwin16.0) libcurl/7.49.1 SecureTransport zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets
$ /usr/local/opt/curl/bin/curl -V
curl 7.51.0 (x86_64-apple-darwin16.1.0) libcurl/7.51.0 SecureTransport zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets

@jenhsun
Copy link

jenhsun commented Nov 7, 2016

Thanks @gerardkok
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.

@chrisroberts
Copy link
Member

chrisroberts commented Nov 7, 2016

Closing as this is a dup of #7969. Thanks for the report!

@lmayorga1980
Copy link

lmayorga1980 commented Jan 20, 2019

👍

@ghost
Copy link

ghost commented Mar 28, 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.

@hashicorp hashicorp locked and limited conversation to collaborators Mar 28, 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

6 participants