Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`brew upgrade <package>`: "<package> cannot be built with any available compilers"

For example, I tried to run brew upgrade ruby-build.

That failed with error:

CompilerSelectionError: ruby-build cannot be built with any available compilers.
Install GNU's GCC
  brew install gcc

When I ran brew install gcc , I got:

Warning: Building gcc from source:
  The bottle needs the Xcode CLT to be installed.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: An exception occurred within a child process:
  CompilerSelectionError: gcc cannot be built with any available compilers.
Install GNU's GCC
  brew install gcc

How can I upgrade ruby-build via brew?

like image 688
Reddirt Avatar asked Feb 07 '19 17:02

Reddirt


1 Answers

I ran this command and it now works:

xcode-select --install
like image 157
Reddirt Avatar answered Nov 05 '22 01:11

Reddirt