Ruby -v dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib

前端 未结 5 1665
轻奢々
轻奢々 2021-01-01 11:31

I\'ve been trying to run a script in the terminal and every time I do I get:

$ ruby directory.rb
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
  R         


        
相关标签:
5条回答
  • 2021-01-01 11:53

    Looks like it is an issue with upgrading the Ruby version.

    Try:

    $ brew rm cloog; brew install cloog 
    

    This seems much like this similar issue: "Upgrading to Ruby 2.1.3 on Mac OSx 10.9.5"

    Hope that works for you.

    0 讨论(0)
  • 2021-01-01 12:04

    For dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib

    you need brew update && brew install gmp

    0 讨论(0)
  • 2021-01-01 12:08

    I just encountered similar issue and was able to resolve it following an answer from superuser.

    brew update && brew install gmp && rvm reinstall 2.1.4
    

    Seems this was an issue with libgmp.10.dylib.

    0 讨论(0)
  • 2021-01-01 12:10

    I ended up solving this by including the brew's gmp directory when installing:

    rvm install ruby-2.2.5 --with-opt-dir=$(brew --prefix gmp)

    0 讨论(0)
  • 2021-01-01 12:14

    Mine was solved with:

    brew update && brew install gmp
    brew upgrade npm
    
    0 讨论(0)
提交回复
热议问题