Could not open terminal in mac

I cannot open a terminal or iTerm on my Mac OS, since my last update was using brew. Not sure what I updated with brew :(

Below is the error message that I get when opening the terminal. Any help is greatly appreciated.

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib Referenced from: /usr/local/bin/bash Reason: image not found [Process completed] 

Thanks in advance!

+8
bash terminal homebrew iterm macos
source share
3 answers

The task consists of two times:

  • Upgrade bash from brew using brew upgrade bash "
  • The solution (aka step 1) requires opening a terminal, but this is not so.

So that’s what I did. As it turned out, the old version of bash is not compatible with the new readline update. So the deal is to look for the readline location in the search.

In my case, it is in /usr/local/Cellar/readline

Inside the above readline directory, I found two directories: "6.3.8" and "7.0" .

I renamed "7.0" to "7.0-old"

Created a new directory "7.0" and copied the contents of "6.3.8" in it.

Hooray! The terminal is now opening.

Now run "brew upgrade bash" from the terminal. And at the same time, restore the readline directory to its previous state, as shown below:

  • Delete the directory "7.0" you created.
  • Rename "7.0-old" to "7.0"

You feel good now. Hooray!

+28
source share

I found that the above solution does not work in my case. Here's what worked:

  • Open the default terminal application, then click "Settings"
  • change "Shell open from" to /bin/bash
  • close terminal
  • open the terminal again, you should return to the prompt now
  • Now run brew upgrade bash from terminal
+2
source share

Do not forget that you may also need to update your terminal settings if you specified your own shell path (which I completely forgot about): enter image description here

0
source share

All Articles