Closed dsiebel closed 2 years ago
I was running into a similar issue with my own go app and found [1].
The solution for me was an update of golang.org/x/sys
go get -u golang.org/x/sys
go get -u golang.org/x/sys
This solution I found in many places, but it doesn't work when installing homebrew formulas from source because you would need to run it inside the formula somehow.
Steps that fixed the issue for me:
git clone git@github.com:little-angry-clouds/kubernetes-binaries-managers.git
cd kubernetes-binaries-managers
go get -u golang.org/x/sys
make build
cp bin/helmenv /usr/local/bin/helmenv
cp bin/helm-wrapper /usr/local/bin/helm
So I've launched a new version. I've updated the dependencies, but also I moved to goreleaser and brew will now download pre-complied binaries, so this problem should never happen again. It will also be a little bit cleaner.
Could somebody please upgrade from brew and see if it works as expected?
Could somebody please upgrade from brew and see if it works as expected?
Will do, thanks for the timely fix!
Not sure if this is due to my environment, but this is what I get:
~ » brew tap little-angry-clouds/my-brews
[...]
~ » brew install helmenv
Error: formulae require at least a URL
Please report this issue:
https://docs.brew.sh/Troubleshooting
/opt/homebrew/Library/Homebrew/formula.rb:273:in `determine_active_spec'
/opt/homebrew/Library/Homebrew/formula.rb:208:in `initialize'
/opt/homebrew/Library/Homebrew/formulary.rb:181:in `new'
/opt/homebrew/Library/Homebrew/formulary.rb:181:in `get_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:420:in `factory'
/opt/homebrew/Library/Homebrew/cli/parser.rb:633:in `block in formulae'
/opt/homebrew/Library/Homebrew/cli/parser.rb:629:in `map'
/opt/homebrew/Library/Homebrew/cli/parser.rb:629:in `formulae'
/opt/homebrew/Library/Homebrew/cli/parser.rb:308:in `parse'
/opt/homebrew/Library/Homebrew/cmd/install.rb:141:in `install'
/opt/homebrew/Library/Homebrew/brew.rb:110:in `<main>'
EDIT: looks to me like the formula does not contain any Darwin
release anymore
https://github.com/little-angry-clouds/homebrew-my-brews/blob/master/Formula/helmenv.rb#L10
Also: when I repeat the steps from my previous comment with the current master
branch and run helm
I get the following "error":
~/w/s/kubernetes-binaries-managers » helm
[1] 28385 killed helm
When I use helm-wrapper
instead of helm
as a name it works...
@alexppg The missing Darwin brew configuration in the formula is a problem for me as well.
My bad, I forgot to add the arm64 url for macOs, sorry. Could you pleas try again?
@alexppg It should be on_macos
, not on_darwin
in the formula
You're right, changed.
Now it works
Confirmed, work now. Thanks!
Thanks to all your help!
I recently started setting up my new MacbookPro with Apple Silicon, part of which is installing
helmenv
via Brewfile:I kept running into that issue where Golang would complain about
and I found various "fixes" on Github and Stack Overflow suggesting to install via Rosetta. I tried it and the error remained the same. I then tried building
helmenv
locally usingCGO_ENABLED=0 go build -a -o helmenv cmd/helmenv/main.go
and the issue remained the same (which is to expected, now that I checked the homebrew formula).The underlying issue seems to be an incompatibility with
go1.18.2
involving thegolang.org/x/sys
library. I cloned the repo, upgraded togo 1.18
andgolang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a
and I was able to buildhelmenv
succefully.Since I can not foresee the sideeffects this might have on the other cmds I thought I'd ask for feedback here, before creating a Pull Request.