I've not run brew update && brew upgrade
for a long time.
I just did a massive upgrade which turned out to broke my Vim.
This is what I got after running vim
:
dyld: Library not loaded: /usr/local/opt/ruby/lib/libruby.2.3.0.dylib
Referenced from: /usr/local/bin/vim
Reason: image not found
Trace/BPT trap: 5
I've came across some websites but none of them were actually helpful.
They said that it might be related to rvm
but brew uninstall vim; rvm system; brew install vim
didn't help. I tried to reinstall my MacVim as well but it didn't solve the problem.
Adding export PATH="/usr/local/bin:$PATH"
to my .bash_profile
didn't help either.
Here's the list for future reference:
What happened to my Vim? How can I fix it?
Answer
brew link --overwrite ruby
Actually, it turned out to be quite simple. I followed the suggestion to run brew doctor
and I got these results:
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
ruby
So I ran brew link ruby
. This is what I got:
Linking /usr/local/Cellar/ruby/2.3.1... v
Error: Could not symlink bin/rake
Target /usr/local/bin/rake
already exists. You may want to remove it:
rm '/usr/local/bin/rake'
As a result I decided to run brew link --overwrite ruby
and now my Vim is working once again!
No comments:
Post a Comment