19

I've been following the directions at http://installrails.com to get my Macbook Air setup for some ruby work but I am running in any issue with RVM. When I try to install Ruby I get the following errors. I also see them when trying to run ruby -v.

dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
  Referenced from: /Users/Chris/.rvm/rubies/ruby-2.1.3/bin/ruby
  Reason: image not found

Googling around hasn't solved it, so I am confused what is causing it. Any suggestions?

31

I had the exact same problem when setting up RVM on my new Mac this morning:

$ ruby -v
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
Referenced from: /Users/psoshnin/.rvm/rubies/ruby-2.1.3/bin/ruby
Reason: image not found

To solve the issue I first ran:

$ brew update && brew upgrade

Then I ran:

$ rvm reinstall 2.1.3 --disable-binary

And it installed successfully for me.

$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]

Hope this helps.

| improve this answer | |
  • Oh you are a champion! :D Now if only it made sense why it was being silly... – teknetia Oct 4 '14 at 0:55
  • 6
    I didn't want to upgrade my various packages for this single issue, so I just ran: brew update && brew install gmp && rvm reinstall 2.1.3 – LeeXGreen Oct 6 '14 at 14:46
  • I didn't have gmp installed. So the comment from @LeeXGreen worked best for me: brew update && brew install gmp && rvm reinstall 2.1.3 – gMale Oct 14 '14 at 22:00
  • --disable-binary saved my day!! Thx! – zavié Oct 15 '14 at 8:09
  • @LeeXGreen, please add an answer so we can upvote :) – Fábio Batista Oct 17 '14 at 6:50
11

This worked for me:

brew update && brew install gmp && rvm reinstall 2.1.3
| improve this answer | |
  • Thx. It's working. – Mr. Black Mar 29 '16 at 2:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.