"syntax error, unexpected keyword_rescue, expecting keyword_end" in Homebrew

The problem was caused by homebrew auto update. Disabling auto update solves the problem:

e.g.

HOMEBREW_NO_AUTO_UPDATE=1 brew install qt5 ninja

2 Likes