例如,我尝试运行brew upgrade ruby-build

失败并显示错误:

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

当我运行brew install gcc时,我得到了:
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

如何通过ruby-build升级brew

最佳答案

我运行了此命令,它现在可以工作:

xcode-select --install

关于ruby-on-rails - `brew upgrade <package>`:“<package> cannot be built with any available compilers”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54579315/

10-13 05:21