Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew services throws error "uninitialized constant Homebrew::Service" #177327

Closed
4 tasks done
featdd opened this issue Jul 14, 2024 · 4 comments · Fixed by Homebrew/homebrew-services#697
Closed
4 tasks done
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@featdd
Copy link

featdd commented Jul 14, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.3.9-149-g7193dc0
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7193dc09449f95a538f289807247e0c13d4c7474
Last commit: 12 minutes ago
Core tap JSON: 14 Jul 14:09 UTC
Core cask tap JSON: 14 Jul 14:09 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: /usr/local/bin/nano
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_NO_INSTALL_CLEANUP: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 15.0.0 build 1500
Git: 2.45.2 => /usr/local/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-x86_64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

I try to execute any brew services command like brew services list

What happened (include all command output)?

Error: uninitialized constant Homebrew::Service
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/usr/local/Homebrew/Library/Homebrew/formula.rb:1264:in `service'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1235:in `plist_name'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:49:in `service_name'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:170:in `to_hash'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formulae.rb:25:in `map'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formulae.rb:25:in `services_list'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/lib/service/commands/list.rb:13:in `run'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/cmd/services.rb:129:in `run'
/usr/local/Homebrew/Library/Homebrew/brew.rb:95: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

What did you expect to happen?

Showing my available services or start/stopping them.

Step-by-step reproduction instructions (by running brew commands)

brew services list
@curiosusJR
Copy link

So what should I do if I met this issue.

@carlocab
Copy link
Member

carlocab commented Aug 1, 2024

brew update then try again.

@0x00-ketsu
Copy link

cd /usr/local/Homebrew/Library/Taps/homebrew/

# Or remove the dir directly
sudo mv homebrew-services /tmp

brew tap homebrew/services

# Works fine
brew services list

@HIIgor
Copy link

HIIgor commented Oct 30, 2024

cd /usr/local/Homebrew/Library/Taps/homebrew/

/usr/local/Homebrew/Library/Taps/homebrew/ does not exists on my mac。

cd /usr/local/Homebrew/Library/Taps/homebrew/

sudo mv homebrew-services /tmp

brew tap homebrew/services

brew services list

stills erro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants