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 · 4 comments

Comments

Projects
None yet
5 participants
@gerardkok

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

This comment has been minimized.

Show comment
Hide comment
@fatmcgav

fatmcgav 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...

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

This comment has been minimized.

Show comment
Hide comment
@gjherbiet

gjherbiet 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

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

This comment has been minimized.

Show comment
Hide comment
@jenhsun

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

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

This comment has been minimized.

Show comment
Hide comment
@chrisroberts

chrisroberts Nov 7, 2016

Collaborator

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

Collaborator

chrisroberts commented Nov 7, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment