2

I just upgraded brew: brew update and brew upgrade and it broke vim. Running vim gives this error:

dyld: Library not loaded: /usr/local/opt/perl/lib/perl5/5.26.2/darwin-thread-multi-2level/CORE/libperl.dylib  
Referenced from: /usr/local/Cellar/vim/8.1.0050/bin/vim
Reason: image not found
Abort trap: 6

Now, .../perl5/5.26.2 has been overwritten by .../perl5/5.28.0. How do I update vim dependencies?

  • No idea what they did, but I cannot get older versions of vim to work, I've lost python3 support and jedi-vim no longer works. What in the world did brew/vim do?! – dwanderson Jul 18 '18 at 22:47
3

Been struggling with this for a few days. Dunno who did what terrible, but:

You can switch (and furthermore pin) versions of brew packages:

$ brew info perl  # lists all the perl version installed
$ brew switch perl 5.26.2
$ brew pin perl  # don't let `brew update` change this

Then, I got an error about python being broken/unavailable...

$ brew info python
$ brew switch python 3.6.5  # 3.7.0 appears to break things
$ brew pin python

Now, vim may work at whatever version it's at (eg 8.1.0150), but if it doesn't, you can try different versions until one works I guess...:

$ brew info vim
$ brew switch vim 8.1.0001
$ brew pin vim
  • Just checked. vim/8.1.0150 works with perl/5.26.2 and python/3.6.5_1. vim/8.1.0050 has issues. – nac001 Jul 18 '18 at 22:59
  • Oh, hmm - when I brew install vim --update it tries to install 8.1.0150, and as a dependency tries to install python 3.7.0. To be honest, I'm not exactly sure which combination was the problematic one; I just know the above works for me. I only just figured out how to pin, so maybe pinning perl and python would've been sufficient? Glad it's working though! updated to have clearer wording – dwanderson Jul 18 '18 at 23:10
1

I ran into the same issue, but was able to keep the up-to-date homebrew releases and maintain vim functionality.

First, homebrew upgrades Python from 3.6 to 3.7 as part of the vim upgrade (not sure what toggle is needed to prevent that). When that happens, you'll "lose" all of your pip modules (they aren't lost, they just aren't ported to the new install path, best to pip3 freeze > pip3.txt prior so you can easily restore your working module set).

Next, to get vim to launch properly, I needed to run a reinstall of perl in homebrew. This re-ran the make and make install steps, which I am guessing provided the library links vim was looking for.

I had originally got a different machine working with the brew switch ... method for moving back to Perl 5.26.2, but that wasn't working on this host. The reinstall did work, however. Now the up-to-date vim launches properly alongside the up-to-date python and perl.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.