I want to install vim via homebrew, from the compile, but even when I ran the command with -s flag, the compile does not occur.

brew install -s vim --with-luajit


brew reinstall -s vim --with-luajit

==> Reinstalling vim

==> Downloading https://homebrew.bintray.com/bottles/vim-8.1.0202

Already downloaded: /Users/me/Library/Caches/Homebrew/vim-8.1.0202.high_sierra.bottle.tar.gz

==> Pouring vim-8.1.0202.high_sierra.bottle.tar.gz

🍺 /usr/local/Cellar/vim/8.1.0202: 1,434 files, 23.4MB

As far as I know, the -s flag or --build-from-source compiles it, not pour, but this always pours for some reasons.

How can I compile vim from scratch?

I use macOS 10.14 Beta and homebrew 1.7.1.


With -v flag, it first rmed several files under /usr/local/. Then reinstalling, downloading, verifying, and pouring showed up in the order. The pouring process showed the following:

tar xf /Users/me/Library/Caches/Homebrew/vim-8.1.0202.high_sierra.bottle.tar.gz -C /var/folders/vk/cbdc97r515b0lv_p1dq_852r0000gn/T/d20180806-64534-6ra3ai

Then it showed "finishing up" process, and then ran several ln -s commands. After that, it showed the following:

/usr/bin/sandbox-exec -f /private/tmp/homebrew20180806-64695-e9syu8.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib:/Library/Ruby/Site/2.3.0:/Library/Ruby/Site/2.3.0/x86_64-darwin18:/Library/Ruby/Site/2.3.0/universal-darwin18:/Library/Ruby/Site:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin18:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin18:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin18:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18:/usr/local/Homebrew/Library/Homebrew/cask/lib:/usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb -v -s --with-luajit --force

brew doctor showed the following (I omitted unrelevant parts such as Python or miniconda):

Warning: You are using macOS 10.14. We do not provide support for this pre-release version. You will encounter build failures and other breakages. Please create pull-requests instead of asking for help on Homebrew's GitHub, Discourse, Twitter or IRC. As you are running this pre-release version, you are responsible for resolving any issues you experience.

Warning: The Command Line Tools header package must be installed on Mojave. The installer is located at: /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg


2 Answers 2


The consequence might not be exactly the same, but adding --HEAD flag on the command worked like a charm.

brew uninstall --force vim
brew install --HEAD -s vim --with-luajit

And now the vim is installed with Lua support.


You already have it installed, you have to tell brew you want to do a reinstall not a install:

$ brew update
$ brew reinstall -s vim --with-luajit
==> Reinstalling vim --without-python --with-luajit
==> Installing dependencies for vim: perl, libyaml
==> Installing vim dependency: perl
==> Downloading https://homebrew.bintray.com/bottles/perl-5.28.0.el_capitan.bottle.tar.gz

You can also force it:

$ brew reinstall -s vim --with-luajit --force

You can also direct brew to use the latest version --HEAD which may help:

$ brew reinstall --HEAD -s vim --with-luajit --force


  • Oh I see. Maybe because I'm on Mojave...? The latter command also poured. brew doctor gets me nothing that seems relevant, except the warnings on the use of Mojave.
    – Blaszard
    Aug 5, 2018 at 19:07
  • @Blaszard - it's clearly something in your system/setup, the commands are known to work and I'm running them now. Need to figure out what's different in your situation.
    – slm
    Aug 5, 2018 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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