vim not working after upgrading to mac os x 10.13.1 high sierra

11

5

I upgraded to mac os high sierra 10.13.1, and now when I try to run vim, I get this message.

dyld: Library not loaded: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib Referenced from: /usr/local/bin/vim Reason: image not found Abort trap: 6

What might I need to do to get vim working again?

I believe I have xcode installed, and also brew, the missing package manager for mac os, if that helps.

Richard Belshoff

Posted 2017-11-09T18:15:13.490

Reputation: 111

Answers

14

Did you install vim with homebrew?

Update homebrew and vim.
brew update
brew upgrade vim

(I'd recommend upgrading everything installed with homebrew brew upgrade - but be ready for things to break.)

You might also need to unlink and re-link vim.

On a 2nd look, it looks like it's due to broken ruby, only re-linking ruby might fix it, but upgrade is still a good idea. brew link --overwrite ruby

My homebrew packages often get broken by a macOS upgrade, it seems best to upgrade everything at the same time.

mjb2kmn

Posted 2017-11-09T18:15:13.490

Reputation: 526

brew upgrade vim did the job – Rahul Prasad – 2018-01-07T16:19:29.760

If you have problems with ownership of /usr/local, try this.

– Giles Gardam – 2018-08-29T19:01:32.433

4

Previous answers did not work for me. (did not try installing from source, didn't want to "own" my macvim at that level)

This did work: brew uninstall --purge macvim brew install macvim

Bruce Edge

Posted 2017-11-09T18:15:13.490

Reputation: 150

2This finally did the trick for me (using vim, not macvim). – SMT – 2017-11-28T16:32:35.263

2

All that stuff didn't quite work for me.

But uninstalling and reinstalling Vim worked.

brew uninstall vim
brew install vim

Korede Aderele

Posted 2017-11-09T18:15:13.490

Reputation: 21

1Do this one! It works! – fauverism – 2018-02-16T16:17:14.453

1

  1. $ brew doctor - let me know I needed to install xcode and fix my path to sbin
  2. $ xcode-select --install (installs xcode)
  3. I also had to add brew's sbin to my path in my .zshrc
  4. $ echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc (fixes path)
  5. $ source ~/.zshrc- (refresh .zshrc)
  6. $ brew install macvim
  7. $ brew upgrade

That did the trick. Now vim opens with $ vim

Pip

Posted 2017-11-09T18:15:13.490

Reputation: 111

0

This worked for me:

$ brew update

$ brew upgrade macvim

actual command output:

[bin]$ brew upgrade macvim
==> Upgrading 1 outdated package, with result:
macvim 8.0-142
==> Upgrading macvim --with-override-system-vim
==> Downloading https://github.com/macvim-dev/macvim/archive/snapshot-142.tar.gz
==> Downloading from https://codeload.github.com/macvim-dev/macvim/tar.gz/snapshot-142
######################################################################## 100,0%
==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --enable-tclinterp --enable-ter
==> make
  /usr/local/Cellar/macvim/8.0-142: 2,147 files, 34.2MB, built in 3 minutes 15 seconds
[bin]$ 

Guido

Posted 2017-11-09T18:15:13.490

Reputation: 101

0

I've tried the previous answer, and I got an error while upgrading vim

brew upgrade vim
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 62f85cfa to af8f8f11.
Updated 1 tap (caskroom/cask).

Error: vim: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb:100: syntax error, unexpected <<
<<<<<<< Updated upstream
  ^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb:101: syntax error, unexpected ',', expecting keyword_end
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb:103: syntax error, unexpected ',', expecting keyword_end
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb:105: syntax error, unexpected ',', expecting keyword_end

But I found using vim in system did work.

brew uninstall --force vim

The path is

where vi
/usr/bin/vi

And it worked.

Chianti

Posted 2017-11-09T18:15:13.490

Reputation: 1

0

If there is a conflict on vim version you have to run unlik macvim before installing. These steps worked for me.

brew uninstall vim

brew unlink macvim

brew install vim

ewalel

Posted 2017-11-09T18:15:13.490

Reputation: 131

0

This worked for me.

Check brew..

brew doctor
brew update

Download Xcode updates just in case..

xcode-select --install

Change your path and use an updated VIM image..

brew unlink vim
brew upgrade macvim

vim

VIM version 8.1.577

Curious if you can do this in macports?

Rick Beacham

Posted 2017-11-09T18:15:13.490

Reputation: 1

-1

I have tried brew update && brew upgrade vim, but hit the same issue. Installing from source solved this issue eventually.

git clone https://github.com/vim/vim.git
cd vim
./configure
make install

zaizen

Posted 2017-11-09T18:15:13.490

Reputation: 1