Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib

后端 未结 11 1608
时光取名叫无心
时光取名叫无心 2021-01-30 01:57

When I try running rails console I get this error:

/Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_         


        
相关标签:
11条回答
  • 2021-01-30 02:26

    Yes, the best answer is to reinstall.

    You can get the version easily by typing:

    ruby -v
    

    With rbenv, the command is i.e.:

    rbenv install 2.3.7
    

    with rvm:

    rvm reinstall 2.3.7
    
    0 讨论(0)
  • 2021-01-30 02:29

    Background: This has happened when I tried to install tig, but I think this is a common issue that you may have that you need to manually link the installed software into the right path that another software wants.

    If you can not find readline installed on your Mac, you should run

    brew install readline
    

    After you installed deadline, brew will ask you to link it. But actually you can not link by running

    brew link readline
    

    Even you can not link by running

    sudo brew link readline
    

    Mac OS will warn you this is extremely dangerous and stop you to do.

    The Latest version of readline is version 8, so you will see the error message like

    Library not loaded: /usr/local/opt/readline/lib/libreadline.8.dylib
    

    The brew installed deadline at

    /usr/local/Cellar/readline/8.0.4
    

    So you have to manually link it to the place that your software wants by using command ls

    ln -s /usr/local/Cellar/readline/8.0.4 /usr/local/opt/readline
    

    Enjoy!

    0 讨论(0)
  • 2021-01-30 02:34

    My problem was just the same when running lftp.

    Just running brew upgrade has solved my problem, as it has updated (among others):

    readline 8.0.0_1 -> 8.0.1
    lftp 4.8.4 -> 4.8.4_2
    
    0 讨论(0)
  • 2021-01-30 02:35

    I would recommend against manually symlink'ing native libraries. Aas of OS X 10.4, the standard include library path /usr/include is no longer used and is locked by SIP (making it difficult to move things to).

    Apple ships a “legacy installer” for you to be able to install the headers in the “old location”, which will also resolve your path to correctly find headers installed via brew.

    cp /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg ~/Desktop && open ~/Desktop/macOS_SDK_headers_for_macOS_10.14.pkg`
    

    See here for a detailed write-up on what is going on.

    0 讨论(0)
  • 2021-01-30 02:39

    Got this issue:

    dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.4.dylib
    

    doing...

    cd /usr/local/opt/mpfr/lib/
    ln -s libmpfr.dylib libmpfr.4.dylib
    

    did the trick for me for macOS Catalina

    0 讨论(0)
  • 2021-01-30 02:40

    So Ive checked a few answers here but I dont think they can work with a vanilla Mojave mac install. Im using 10.14.4 while I did these:

    • get homebrew from https://brew.sh

    • $ brew install coreutils : this installs the gnu coreutils pkg for mac, we want the greadlink from this because macOSX's readlink is not the same as the gnu readlink. Its extremely confusing but such is the life in macland.

    • $ echo 'alias readlink=greadlink' >> ~/.bash_aliases I found macs readlink to be a bit lacking so I overrode the existing readlink by aliasing greadlink. (you can make this usable by all users by $ alias readlink=greadlink >> /etc/bashrc which will enable every user to be able to use it.

    • $ ln -s /usr/local/opt/readline/lib/libreadline.8.dylib /usr/local/opt/readline/lib/libreadline.7.dylib I linked the already linked .8. file instead of '.8.0.' file because if it were to get updated to .8.1. then my readlink wont break or miss features on the library. Im pretty sure we will format our macs before 9+ comes out.

    0 讨论(0)
提交回复
热议问题