Solvedbrew Broken vim after perl upgrade

  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • Confirmed this is a problem with Homebrew/brew and not specific formulae? If it's a formulae-specific problem please file this issue at

Bug reports:

I pinned vim in homebrew. And recently I ran brew upgrade to upgrade to latest packages. After that, when I try to run vim, I get the following error:

dyld: Library not loaded: /usr/local/opt/perl/lib/perl5/5.24.0/darwin-thread-multi-2level/CORE/libperl.dylib
  Referenced from: /usr/local/bin/vim
  Reason: image not found
[1]    44267 abort      vim

I have to unpin vim and reinstall vim to open vim without this error. Shouldn't there be some mechanism that prevents perl from being updated when vim is pinned?

brew config output:

HEAD: 394f9fa0aaa5854aa52bc589708a079665dcf462
Last commit: 10 days ago
Core tap ORIGIN:
Core tap HEAD: 18dd3190df1943c1c133a9e8a47e3da1b4ed8e44
Core tap last commit: 37 minutes ago
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.12.0 => /usr/local/bin/git
Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.24.1/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/koAllen/.rvm/rubies/ruby-2.3.0/bin/ruby
Java: 1.8.0_101
macOS: 10.12.2-x86_64
Xcode: N/A
X11: 2.7.9 => /opt/X11

brew doctor output:

Your system is ready to brew.
15 Answers

✔️Accepted Answer

I met this issue too when I had ran brew upgrade,so I tried:

  • brew uninstall --ignore-dependencies perl
  • brew uninstall vim
  • brew install vim

Event though I have to update my Vim version, but it works for me...

Other Answers:

Every time perl, python or ruby are upgraded or revision bumped, vim needs to be brew reinstall'd. It's a known issue. This would be a known issue even against the system Perl if Apple ever gets round to implementing another major Perl update.

More Issues: