Library not loaded: /usr/local/opt/gdbm/lib/libgdbm.4.dylib

After upgrading, my terminal no longer works:

dyld: Library not loaded: /usr/local/opt/gdbm/lib/libgdbm.4.dylib
Referenced from: /usr/local/bin/zsh
Reason: image not found

iTerm2 completely shuts down on start up, and Terminal throws the above error.
I can’t even run commands by going to Terminal > Shell > New Command. It doesn’t understand what the brew command, so I have no clue how I’m going to be able to fix this. Any help appreciated.

Ok, changing my default shell to bash lets me use commands, so I think I can fix this.

1 Like

I’m having the same exact issue… were you able to resolve this? and if so, how? Thanks in advance!!

1 Like

My guess would be starting a bash terminal and running brew upgrade zsh

11 Likes

yeah! it fixed!:rofl::rofl::rofl::rofl::rofl:

2 Likes

Brew Terminal doesn’t start because “libqdbm.4.dylib" loading fails.

To fix that problem, my solution follows here:

  1. Rename /usr/local/opt/gdbm/lib/libgdmb.6.dylib
    into usr/local/opt/gdbm/lib/libgdmb.4.dylib

  2. Attention: brew install gdmb io. but do not run brew reinstall gdmb! If not, libgdmb.4.dylib will be replaced by libgdmb.6.dylib again and forces the same failure at start terminal.

  3. To works brew update runs before brew untap homebrew/homebrew-dupes. .

[https://github.com/robbyrussell/oh-my-zsh/issues/6956](http://issues 6956)

1 Like

That’s not a great idea. The versioning is there with a reason and tricking software into accepting a newer version will break things for sure. It’s better to reinstall from source or to check for upgrades.

1 Like

^ was helpful for me