Vagrant: macOS Vagrant 2.0.1 error /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/specification.rb:17

Created on 3 Nov 2017  ·  57Comments  ·  Source: hashicorp/vagrant

Vagrant version

2.0.1

Host operating system

macOS Sierra 10.12.6

Expected behavior

Display version

Actual behavior

% vagrant --version
/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/specification.rb:17:in `require': dlopen(/opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle, 9): no suitable image found.  Did find: (LoadError)
    /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle: malformed mach-o image: load command #17 length (0) too small in /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle
    /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle: malformed mach-o image: load command #17 length (0) too small in /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle - /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/specification.rb:17:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems.rb:1334:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems.rb:1334:in `<module:Gem>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems.rb:116:in `<top (required)>'
    from <internal:gem_prelude>:4:in `require'
    from <internal:gem_prelude>:4:in `<internal:gem_prelude>'

Steps to reproduce

Install Vagrant 2.0.1 and exec vagrant --version

Most helpful comment

Hi everyone,

Fixed package has been built and uploaded. You can download the fixed package here:

https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.dmg

Thank you for the report on this issue and the patience in getting it resolved. I'll leave this issue open for a bit even though it is resolved to provide visibility for anyone that may still have the previous package.

Cheers!

All 57 comments

same happens when running any vagrant subcommands, ou just vagrant as well

vagrant version

vagrant --help

# etc.

Same here. Cannot Start or stop machines

Same here.

Vagrant version

2.0.1

Host operating system

macOS High Sierra 10.13.1

Steps to reproduce

all vagrant commands including just vagrant.

+1

I have the exact same problem. Any solution to that?

vagrant

/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/specification.rb:17:in `require': dlopen(/opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle, 9): no suitable image found.  Did find: (LoadError)
    /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle: malformed mach-o image: load command #17 length (0) too small in /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle
    /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle: malformed mach-o image: load command #17 length (0) too small in /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle - /opt/vagrant/embedded/lib/ruby/2.4.0/x86_64-darwin13/stringio.bundle
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/specification.rb:17:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems.rb:1334:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems.rb:1334:in `<module:Gem>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems.rb:116:in `<top (required)>'
    from <internal:gem_prelude>:4:in `require'
    from <internal:gem_prelude>:4:in `<internal:gem_prelude>'

Same here: Mac OS High Sierra with vagrant 2.0.1

Ditto

Same here :(

Me too. Sigh.

this seems like the best solution for now:

$ wget https://releases.hashicorp.com/vagrant/2.0.0/vagrant_2.0.0_x86_64.dmg

Same issue here, as above v2.0.0 works for me, so I'll be using that for now.

Same here :(

Same issue here.

I'm guessing there's an issue with the ruby that is bundled with Vagrant - is it for the right architecture (x86_64)?

same error on 10.11.6 :(

@prasanna seems to be

$ file stringio.bundle stringio.bundle: Mach-O 64-bit bundle x86_64

Oh wait, darwin13 is wrong, it should be 17 for 10.13

No that's a red herring, 2.0.0 uses darwin13 as well and that works.

Same here

same

Same issue on macOS Sierra 10.12.6

Note that Vagrant 2.0.0 does not support VirtualBox 5.2, so you'll want to keep VirtualBox 5.1.30 until the issue is fixed.

same issue on macOS Sierra 10.12.6

rollback (https://releases.hashicorp.com/vagrant/2.0.0/vagrant_2.0.0_x86_64.dmg) fixes the problem at the moment

Just upgraded vagrant - I'm receiving this error too on macOS High Sierra (10.13.1). Rolled back to Vagrant 2.0.0

As mentioned before:

This is a currently working stack (macOS):

My System: macOS 10.13.1

Same problem here:

  • macOS High Sierra 10.13.1
  • Vagrant 2.0.1
  • VirtualBOX 5.1.30

I fixed it going to Vagrant 2.0.0 again.

Upgrading to Ruby 2.4.0 as part of a x.0.1 release. Interesting.

The same error

same

same 😢

I really hope that an updated and working version of the 2.0.1 installer for OS X could be provided today. Not that we have to wait until the next regular release with version 2.0.2. :/

same issue

Same here

Same issue here

Same issue MacOS 10.13.1

Same on 10.12.5

It's looked like newest 2.0.1 version use Ruby 2.4.0 version. My guess the file stringio.bundle is crashed during packaging...
I look back version 2.0.0 stringio.bundle at
/opt/vagrant/embedded/lib/ruby/2.3.0/x86_64-darwin13
size is about 44,292. How about the newest one?

My macOS 10.13.1 and use vagrant 2.0.0. Still hasn't upgrade yet!

@jenhsun for 2.4.0 it is 35,812.

@briancain Is it possible to use travis to verify vagrant on macOS platforms in the future? https://docs.travis-ci.com/user/reference/osx/

+1

If someone can build Ruby 2.4.0 for darwin13, we could probably copy that file over.

Just an update that there was a build issue on the darwin package in the latest build. I have identified the source and am working to resolve the build issue. I will be uploading a fixed package as soon as it is complete.

+1 here

+1

Hi everyone,

Fixed package has been built and uploaded. You can download the fixed package here:

https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.dmg

Thank you for the report on this issue and the patience in getting it resolved. I'll leave this issue open for a bit even though it is resolved to provide visibility for anyone that may still have the previous package.

Cheers!

@austinlparker this is probably related to the 2.4.0 change, but I suspect it's an issue with the plugin itself. Either way, it sounds like a new ticket.

@chrisroberts that fixed things for me. Thanks!

Hey @chrisroberts I've just noticed here: https://www.hashicorp.com/devops-defined

That the grammar under the Test section is a bit weird. Eg:

"Test while an application is being written and prior to release, it goes through multiple types of testing."

That reads like the word "test" has been arbitrarily prefixed at the beginning of the sentence and perhaps shouldn't be there, in any case it doesn't read like a proper sentence.

Also:

"The simplest tests, unit testing, is done by developers"

shouldn't "is" be "are" in this sentence?

Patched version fixed for me as well. (10.13.1).
Thanks.

thank for the fast fix @chrisroberts ! and also thanks for the somehow better and more descriptive error messages in vagrant 2.x. with those i was able to track down an issue with starting a certain vm ;)

Can confirm all is working good my end. Thanks for the quick fix!

Hi @m4rkw, thanks for the feedback on that page. I'll be sure it gets passed along for review :smiley:

@chrisroberts I downloaded and installed the fix. It works. Thanks a lot.

@chrisroberts It works! Thanks a lot!

Smooth and clean! Everything is working as expected!
Thank you! :)

Working on my machine now. Thanks!

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