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

Error: uninitialized constant Homebrew::Service #696

Closed
lamkuan opened this issue Jul 14, 2024 · 5 comments · Fixed by #697
Closed

Error: uninitialized constant Homebrew::Service #696

lamkuan opened this issue Jul 14, 2024 · 5 comments · Fixed by #697

Comments

@lamkuan
Copy link

lamkuan commented Jul 14, 2024

截圖 2024-07-14 22 58 35
@kytta
Copy link

kytta commented Jul 14, 2024

I am experiencing a similar issue with Backrest (provided in a third-party tap)

What I'm doing

$ brew services restart garethgeorge/backrest-tap/backrest
Error: uninitialized constant Homebrew::Service
Warning: Removed Sorbet lines from backtrace!
/opt/homebrew/Library/Homebrew/formula.rb:1264:in `service'
/opt/homebrew/Library/Homebrew/formula.rb:1235:in `plist_name'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:49:in `service_name'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:211:in `status_output_success_type'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:104:in `loaded?'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/commands/restart.rb:21:in `block in run'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/commands/restart.rb:20:in `each'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/commands/restart.rb:20:in `run'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/cmd/services.rb:135:in `run'
/opt/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
with --debug --verbose
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromNameLoader): loading backrest
Error: uninitialized constant Homebrew::Service
/opt/homebrew/Library/Homebrew/formula.rb:1264:in `service'
/opt/homebrew/Library/Homebrew/formula.rb:1235:in `plist_name'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11481/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11481/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11481/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:49:in `service_name'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:211:in `status_output_success_type'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/formula_wrapper.rb:104:in `loaded?'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/commands/restart.rb:21:in `block in run'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/commands/restart.rb:20:in `each'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/lib/service/commands/restart.rb:20:in `run'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/cmd/services.rb:135:in `run'
/opt/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

brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  schildichat

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  python-packaging

None of the packages above should matter here, as they're not dependencies of this Formula

brew config

HOMEBREW_VERSION: 4.3.9-154-gb9da669
ORIGIN: https://github.com/Homebrew/brew
HEAD: b9da669ef25c7da0757f5ae1d418985b19efb321
Last commit: 14 minutes ago
Core tap HEAD: 25c2eae0b65332a1496be01e3ea968f631e373df
Core tap last commit: 35 minutes ago
Core tap JSON: 14 Jul 14:58 UTC
Core cask tap HEAD: 358947238dd8946bafd9ffca2d036b2aaa57a4f3
Core cask tap last commit: 49 minutes ago
Core cask tap JSON: 14 Jul 14:58 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BAT: set
HOMEBREW_BAT_THEME: OneHalfDark
HOMEBREW_BROWSER: open
HOMEBREW_CASK_OPTS: ["--no-quarantine"]
HOMEBREW_CLEANUP_MAX_AGE_DAYS: 30
HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: 7
HOMEBREW_EDITOR: micro
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_ENV_HINTS: set
HOMEBREW_NO_INSTALL_CLEANUP: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.45.2 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 13.6.7-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: N/A
Rosetta 2: false

@kytta
Copy link

kytta commented Jul 14, 2024

It is also worth mentioning that every brew services command causes this, including the one without any arguments

@SMillerDev
Copy link
Member

See also Homebrew/homebrew-core#177327

@horseson2018
Copy link

See also Homebrew/homebrew-core#177327

So what should I do? brew update?

@HIIgor
Copy link

HIIgor commented Oct 30, 2024

same error。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants