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: private method `system' called for module Homebrew #1413

Closed
3 tasks done
P4sca1 opened this issue Jul 18, 2024 · 9 comments · Fixed by Homebrew/brew#17879
Closed
3 tasks done

Error: private method `system' called for module Homebrew #1413

P4sca1 opened this issue Jul 18, 2024 · 9 comments · Fixed by Homebrew/brew#17879

Comments

@P4sca1
Copy link

P4sca1 commented Jul 18, 2024

brew config

HOMEBREW_VERSION: 4.3.9-307-g4aae003
ORIGIN: https://github.com/Homebrew/brew
HEAD: 4aae003a1a9caa4a5b22c3c9c23afd6b1ef58a0f
Last commit: 10 hours ago
Core tap JSON: 18 Jul 13:00 UTC
Core cask tap JSON: 18 Jul 13:00 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4/bin/ruby
CPU: dodeca-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.

What were you trying to do (and why)?

Installing multiple packages using brew bundle

brew bundle --no-lock --file=/dev/stdin <<EOF
brew "helix"
brew "fzf"
brew "fd"
brew "n"
brew "gh"
brew "jq"
brew "go"
brew "hcloud"
brew "kubectl"
brew "helm"
EOF

What happened (include all command output)?

Error: private method `system' called for module Homebrew
/usr/local/Homebrew/Library/Homebrew/extend/kernel.rb:267:in `safe_system'
/usr/local/Homebrew/Library/Homebrew/brew.rb:139:in `block in <main>'
/usr/local/Homebrew/Library/Homebrew/extend/kernel.rb:530:in `with_env'
/usr/local/Homebrew/Library/Homebrew/brew.rb:128:in `<main>'

What did you expect to happen?

The install should succeed.

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

The issue also occurs when running `brew bundle` without any arguments.
@jacobbednarz
Copy link
Member

i'm not able to reproduce this on a fresh install. is there anything else about your local setup that would help diagnose this?

failing this, you may want to try a reinstall of Homebrew in case something has gone astray there.

@hyo-choi
Copy link

hyo-choi commented Jul 19, 2024

@P4sca1 Hi! I had a same problem on homebrew version 4.3.9-329-g61f5e2b and when I downgraded homebrew(to 4.3.0), this issue disappeared. I don't know what makes this error but if you need quick workaround, it would work.
The way to downgrade homebrew: https://www.phind.com/search?cache=o3chmif13bdstds44r6qqsye

@P4sca1
Copy link
Author

P4sca1 commented Jul 21, 2024

I upgraded homebrew to 4.3.10 and ran brew bundle again. It is now working as expected again. It also automatically downloaded a new version of homebrew-bundle, so I am not sure which update resolved the issue.

@P4sca1 P4sca1 closed this as completed Jul 21, 2024
@johng
Copy link

johng commented Jul 26, 2024

I see this issue on HEAD, downgrading to 4.3.10 fixes it

@MikeMcQuaid
Copy link
Member

@johng I'm on HEAD on both and don't see this on either. Try to run brew update.

@johng
Copy link

johng commented Jul 26, 2024

From a clean brew installation I run into it.

➜  tmp  git clone https://github.com/Homebrew/brew.git brew
➜  tmp ./brew/bin/brew bundle
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:1e64d7393d6bed090ebd892514457a10a2066682693eaade7d4a25568fa35312
Already downloaded: /Users/jgriffith43/Library/Caches/Homebrew/portable-ruby-3.3.4.arm64_big_sur.bottle.tar.gz
==> Pouring portable-ruby-3.3.4.arm64_big_sur.bottle.tar.gz
Error: private method `system' called for module Homebrew
/Users/jgriffith43/tmp/brew/Library/Homebrew/extend/kernel.rb:267:in `safe_system'
/Users/jgriffith43/tmp/brew/Library/Homebrew/brew.rb:139:in `block in <main>'
/Users/jgriffith43/tmp/brew/Library/Homebrew/extend/kernel.rb:530:in `with_env'
/Users/jgriffith43/tmp/brew/Library/Homebrew/brew.rb:128:in `<main>'
Do not report this issue: you are running in an unsupported configuration.

Also have seen this on our CI and had to pin to 4.3.10

@MikeMcQuaid MikeMcQuaid reopened this Jul 26, 2024
@MikeMcQuaid
Copy link
Member

Apologies @johng, still can't reproduce this locally but will try with your instructions when I get a bit.

@p-linnane
Copy link
Member

p-linnane commented Jul 26, 2024

I'm getting an error about curl when I follow @johng's steps:

╰─ ./brew/bin/brew bundle
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:1e64d7393d6bed090ebd892514457a10a2066682693eaade7d4a25568fa35312
############################################################################################################################################################################################################### 100.0%
==> Pouring portable-ruby-3.3.4.arm64_big_sur.bottle.tar.gz
Error: 'curl' must be installed and in your PATH!
Error: private method `system' called for module Homebrew
/Users/patrick/Downloads/brew/Library/Homebrew/extend/kernel.rb:267:in `safe_system'
/Users/patrick/Downloads/brew/Library/Homebrew/brew.rb:139:in `block in <main>'
/Users/patrick/Downloads/brew/Library/Homebrew/extend/kernel.rb:530:in `with_env'
/Users/patrick/Downloads/brew/Library/Homebrew/brew.rb:128:in `<main>'
Do not report this issue: you are running in an unsupported configuration.

@johng
Copy link

johng commented Jul 26, 2024 via email

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.

6 participants