MacOS 14.5
Install apache for MacOS and failed with uninitialized constant Homebrew error.
error message:
s@SdeMacBook-Pro Downloads % brew services start httpd
Error: uninitialized constant Homebrew::Service
/opt/homebrew/Library/Homebrew/formulary.rb:396:in `block in load_formula_from_api'
/opt/homebrew/Library/Homebrew/formulary.rb:285:in `initialize'
/opt/homebrew/Library/Homebrew/formulary.rb:285:in `new'
/opt/homebrew/Library/Homebrew/formulary.rb:285:in `load_formula_from_api'
/opt/homebrew/Library/Homebrew/formulary.rb:969:in `load_from_api'
/opt/homebrew/Library/Homebrew/formulary.rb:962:in `klass'
/opt/homebrew/Library/Homebrew/formulary.rb:570:in `get_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:1016:in `factory'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/cmd/services.rb:113:in `services'
/opt/homebrew/Library/Homebrew/brew.rb:96:in `public_send'
/opt/homebrew/Library/Homebrew/brew.rb:96:in `<main>'
If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
https://github.com/homebrew/homebrew-services/issues/new
solution:
1. cd /opt/homebrew/Library/Taps/homebrew
2. rm -rf homebrew-services
3. brew tap homebrew/services
4. check updated files and services
5. brew services start httpd