brew install 问题解决

$python -V
Python 3.6.0



brew install



If that doesn’t show you an update run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select –install



Alternatively, manually download them from:
https://developer.apple.com/download/more/.



Error: An exception occurred within a child process:
NoMethodError: undefined method `source’ for nil:NilClass

https://stackoverflow.com/questions/61129432/brew-installation-of-elasticsearch-failing



brew install –debug gdb



https://github.com/rbenv/ruby-build/issues/1434
After running brew doctor I saw brew was complaining my Xcode version was outdated.



I have updated to



Xcode 11.4 Build version 11E146
Now the error has disappeared



https://github.com/Homebrew/brew/issues/7115
https://github.com/shrinerb/shrine/issues/439



/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb
Error: An exception occurred within a child process:
NoMethodError: undefined method source' for nil:NilClass
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/extend/ENV/super.rb:111:in
setup_build_environment’
/usr/local/Homebrew/Library/Homebrew/build.rb:88:in install'
/usr/local/Homebrew/Library/Homebrew/build.rb:198:in
<main>’



https://github.com/Homebrew/brew/issues/1585



If that doesn’t show you an update run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select –install



重新安装xcode
$sudo rm -rf /Library/Developer/CommandLineTools
$sudo xcode-select –install
xcode-select: note: install requested for command line developer tools



Error: An exception occurred within a child process:
CompilerSelectionError: gdb cannot be built with any available compilers.
Install GNU’s GCC:
brew install gcc



/usr/local/Homebrew/Library/Homebrew/compilers.rb:102:in compiler'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:84:in
select_for’
/usr/local/Homebrew/Library/Homebrew/extend/ENV/shared.rb:179:in compiler'
/usr/local/Homebrew/Library/Homebrew/extend/ENV/super.rb:42:in
setup_build_environment’
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/extend/ENV/super.rb:122:in setup_build_environment'
/usr/local/Homebrew/Library/Homebrew/build.rb:88:in
install’
/usr/local/Homebrew/Library/Homebrew/build.rb:198:in `<main>’



brew install gcc



Category web