Error loading library in mac terminal

后端 未结 8 467
北荒
北荒 2021-01-31 02:10

Anyone please help..
How can I fix the following error:

dyld: Library not loaded: /usr/local/lib/libgdbm.4.dylib  
  Referenced from: /usr/local/bin/zsh  
         


        
相关标签:
8条回答
  • 2021-01-31 02:28

    Late to the party on this one, but simply running

    brew upgrade zsh

    solved my issue on MacOS High Sierra. Trying to uninstall gdbm will throw dependency errors against zsh and python, and re-doing the symlinks didn't solve for me, either

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

    execute this command

       chsh -s /bin/zsh                   
    
    0 讨论(0)
  • 2021-01-31 02:33

    To be able to fix my terminal/iterm2/hyper (all were broke because of broken zsh) I had to first change my terminal settings 'Shells open with' from a custom command to the default login shell.

    Without these changes, I could not type anything in terminal and iterm2 and hyper were crashing immediately after start.

    With these changes, I was able to update my zsh via homebrew as suggested in the other answers by De_Vano and C.Nivs and all three apps worked as expected again. In my case a simple upgrade of zsh was enough. No need to reinstall and unlink.

    0 讨论(0)
  • 2021-01-31 02:35

    If you facing the issue in iTerm2. You can simply change the path of your shell. Just go to iTerm2>>Preferences>>profile>>General>>command

    Click on the dropdown and select Command and enter the command

    /bin/zsh

    This worked for me

    0 讨论(0)
  • 2021-01-31 02:37

    I had the same issue and did not have an option to change the terminal on startup.

    I ended up doing the following steps to resolve the problem:

    1. Create a new user on my mac & enable remote login for him.

    2. Login with the new user, which got a new working shell.

    3. Changing the shell of my original account back to bash, using the chsh command.

    4. Upgrading zsh using brew.

    It Worked!

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

    Simple reinstall zsh will help you:

    brew reinstall zsh && brew unlink zsh && brew link zsh
    

    Alternatively you can try to upgrade zsh

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