Vagrant: Vagrant 1.8.5 embedded open ssl error

Created on 22 Aug 2016  ยท  24Comments  ยท  Source: hashicorp/vagrant

Vagrant version

vagrant -v
Vagrant 1.8.5

Host operating system

OS X 10.11.6

Guest operating system

Don't get that far
This is the operating system you run in the virtual machine.

Vagrantfile

https://github.com/coreos/coreos-kubernetes/blob/master/multi-node/vagrant/Vagrantfile

Debug output

https://gist.github.com/mkrakowitzer/14fbcedc96056de8dd6ced77512b01b3

Expected behaviour

Vagrant VMs should be created

Actual behaviour

I get an ssl error when running vagrant commands from the directory. The embedded openssl command also give an error when run directly.

$ pwd
/Users/merritt
$ /opt/vagrant/embedded/bin/openssl
dyld: Library not loaded: /vagrant-substrate/staging/embedded/lib/libssl.1.0.0.dylib
  Referenced from: /opt/vagrant/embedded/bin/openssl
  Reason: image not found
[1]    61922 trace trap  /opt/vagrant/embedded/bin/openssl
$ vagrant version
Installed Version: 1.8.5
Latest Version: 1.8.5

You're running an up-to-date version of Vagrant!
dyld: Library not loaded: /vagrant-substrate/staging/embedded/lib/libssl.1.0.0.dylib
  Referenced from: /opt/vagrant/embedded/bin/openssl
  Reason: image not found
./../../lib/init-ssl-ca: line 32: 61480 Trace/BPT trap: 5       $OPENSSL genrsa -out "$OUTDIR/ca-key.pem" 2048
failed generating SSL artifacts
$vagrant up
dyld: Library not loaded: /vagrant-substrate/staging/embedded/lib/libssl.1.0.0.dylib
  Referenced from: /opt/vagrant/embedded/bin/openssl
  Reason: image not found
./../../lib/init-ssl-ca: line 32: 61523 Trace/BPT trap: 5       $OPENSSL genrsa -out "$OUTDIR/ca-key.pem" 2048
failed generating SSL artifacts

Steps to reproduce

  1. git clone https://github.com/coreos/coreos-kubernetes.git
  2. cd coreos-kubernetes/multi-node/vagrant
  3. vagrant up

    References

  • GH-2646
  • GH-7186
bug guesdarwin installer

Most helpful comment

Yes I have openssl installed via brew

$ brew install openssl
Warning: openssl-1.0.2h_1 already installed
$ openssl version
OpenSSL 1.0.2h  3 May 2016

The work around suggested by @garadox seemed to work though:

$sudo ln -sf /usr/local/bin/openssl /opt/vagrant/embedded/bin/openssl

All 24 comments

Exactly same issue here, using same OS and vagrant versions
Host operating system
OS X 10.11.6

Vagrant version
vagrant -v
Vagrant 1.8.5

Same here. Worked around it by symlinking openssl from /usr/bin over the top of the embedded one.

I see the same behavior in Vagrant 1.8.1 and 1.8.5 on Mac OS X 10.11.6. The 1.8.1 version had been working for months, so something must have changed underneath.

Have you installed openssl via brew?

I updated brew and openssl to openssl-1.0.2h_1, but same result

I have openssl installed keg-only, so no binary in the path or library in the ld path.

Yes I have openssl installed via brew

$ brew install openssl
Warning: openssl-1.0.2h_1 already installed
$ openssl version
OpenSSL 1.0.2h  3 May 2016

The work around suggested by @garadox seemed to work though:

$sudo ln -sf /usr/local/bin/openssl /opt/vagrant/embedded/bin/openssl

Work around also worked for me, thanks @garadox for the heads up

Creating the symlink worked for me as well. Thanks!

worked for me too

Good I found this thread!! the solution did the trick for me as well. Thanks @garadox

same hier. Thanks @garadox

@mkrakowitzer That also work for me.

same! Thanks @garadox

same issue, works for me

Suggestion by @garadox worked for me as well. Thanks!

Is this issue still encountered with the latest release (1.8.6) ?

Yes, the version of openssl bundled with 1.8.6 still has this error:

 % cd /opt/vagrant/embedded/bin
 % ./openssl
dyld: Library not loaded: /vagrant-substrate/staging/embedded/lib/libssl.1.0.0.dylib
  Referenced from: /opt/vagrant/embedded/bin/./openssl
  Reason: image not found
[1]    99422 trace trap  ./openssl

As others have noted, replacing the binary (by symlink or copy) with the OS X version `/usr/bin/openssl' works around the problem.

@amarburg Thanks for the update!

same issue in 1.8.6. worked around modifying OPENSSL path from $(which openssl) to /usr/bin/openssl in below files

~/coreos-kubernetes/lib/init-ssl-ca
/coreos-kubernetes/lib/init-ssl

Embedded openssl lib fixed in 1.8.7 release via mitchellh/vagrant-installers#95

You don't need the symlink specifically. Just get rid of the vagrant bundled openssl command. Both solutions work.

: cd /opt/vagrant/embedded/bin
: sudo mv openssl openssl.old

@esumerfd your solution did the trick. Thank you.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomhking picture tomhking  ยท  3Comments

rrzaripov picture rrzaripov  ยท  3Comments

luispabon picture luispabon  ยท  3Comments

cbednarski picture cbednarski  ยท  3Comments

DreadPirateShawn picture DreadPirateShawn  ยท  3Comments