Terminal won't open after brew upgrade (dyld library not loaded) I ran "brew upgrade" from the terminal, before upgrading finished the battery ran out on my MBP and the computer restarted. Now when I go to open a terminal the terminal window flashes up for a split second before closing. I managed to capture the terminal output before it closed:



dyld: Library not loaded: /use/local/lib/libgdbm.4.dylib

How can I fix this?

Please note that I cannot open a terminal to issue any commands!
Install iTerm.app You can set up a profile that you can set the start up program do be /bin/bash

Or create a new admin user and use that to restore or reinstall files. I think you might be able to use dscl from that user to change the original users' shell