I tried to upgrade vim using brew upgrade vim and I cannot make vim works anymore since then.
The error message I get is:
dyld: Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /usr/local/bin/vim
Reason: image not found
Abort trap: 6
I tried the following:
brew uninstall vim
brew cleanup
brew install vim
but it did not solve the problem at all.
I also completely removed the content of the .vimrc file where some plugings were installed to check for python syntax.
Again, that did not change the error message I get.
I do not know what I am missing, and I would like to understand where the problem comes from.
I have fixed the issue and it is kinda hack but whatever it works now :) My error was following:
dyld: Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /usr/local/bin/vim
Reason: image not found
The issue was actually not having version 3.7 located on the path: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/
However I had 3.8 folder there...
So I just made a sym link by doing
$ ln -s 3.8 3.7
And yes I am aware that the fix should be changing reference from /usr/local/bin/vim to use 3.8 instead of 3.7 but this works also and I did not have the time to dive in it further.
I was facing the similar error but with different library :
dyld: Library not loaded: /usr/local/opt/lua/lib/liblua.5.3.dylib Referenced from: /usr/local/Cellar/macvim/....../MacOS/Vim Reason: image not found Abort trap: 6
and the workaround give above to add symlink to the available version in the /usr/local/opt/lua/lib directory helped.
Below is what I did:
cd /usr/local/opt/lua/lib
$ ls
liblua.5.4.2.dylib liblua.5.4.dylib liblua.dylib liblua5.4.dylib pkgconfig
Above are the versions present in my lib dir and vi was trying to load : /usr/local/opt/lua/lib/liblua.5.3.dylib.
Running the below symlink helped and now i can open my vi editor as usual:
ln -s liblua.5.4.dylib liblua.5.3.dylib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With