gravitl / homebrew-netclient Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I tried to upgrade netclient from 0.16.0 to 0.16.1 on my laptop with M1 chip and macOS Monterey, but brew upgrade netclient
failed with the message Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
The same error will also occur if I try brew uninstall netclient
or brew reinstall netclient
.
> brew upgrade netclient
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.16.0 -> 0.16.1
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.16.1/darwin/netclient-arm64.tgz
Already downloaded: /Users/xyz/Library/Caches/Homebrew/downloads/9f9edc353fa2425663f1294b3bac0a5ff9e472d3e3ddbc873be1b740431f5143--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script
==> Purging files for version 0.16.1 of Cask netclient
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
By the way, I have to modify the PATH variable in /Library/LaunchDaemons/com.gravitl.netclient.plist
manually to make netclient work, since homebrew put the binaries of wireguard-tools in /opt/homebrew/bin
instead of /opt/homebrew/sbin
on my system.
> which wg
/opt/homebrew/bin/wg
No response
Traditionally, homebrew uses a prefix of /usr/local/bin
. This means that netclient
would be installed under /usr/local/bin/netclient
. This path is also hardcoded in the launch daemon created on installation from homebrew.
On M1 (arm64) Macs, due to the architectural changes, homebrew changed its prefix to /opt/homebrew
. This means that netclient
is now installed under /opt/homebrew/bin/netclient
. This means that the launch daemon is invalid and essentially renders netclient unusable. Additionally, the PATH environment variable in the launch daemon needs to have /opt/homebrew/bin
, as this is where wg
would be. But what is more, even after fixing these two issues, netclient
still does not run due to the raised security level on the new Macs:
This is trivial to fix though, remove the quarantine flag of the binary in your installation script:
xattr -c /opt/homebrew/bin/netclient
After applying all these changes, I can finally use netclient. I hope you can incorporate what is necessary to fix it for everyone :)
TL;DR of fixes (run as sudo):
sed -i '' 's|/usr/local/bin/netclient|/opt/homebrew/bin/netclient|g' /Library/LaunchDaemons/com.gravitl.netclient.plist
sed -i '' 's|/usr/local/sbin|/opt/homebrew/bin:/usr/local/sbin|g' /Library/LaunchDaemons/com.gravitl.netclient.plist
xattr -c /opt/homebrew/bin/netclient
# if applying changes post-mortem, need to reload launch daemon
launchctl unload /Library/LaunchDaemons/com.gravitl.netclient.plist
launchctl load /Library/LaunchDaemons/com.gravitl.netclient.plist
Thanks!
v0.14.6
Mac
No response
No response
Attempting to uninstall netclient using brew returns an error:
~ % brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
v0.16.3
Mac
~ % brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
Loving this project, BTW, and want to install it on my macOS machine, but...
❯ brew tap gravitl/netclient
==> Tapping gravitl/netclient
Cloning into '/usr/local/Homebrew/Library/Taps/gravitl/homebrew-netclient'...
remote: Enumerating objects: 204, done.
remote: Total 204 (delta 0), reused 0 (delta 0), pack-reused 204
Receiving objects: 100% (204/204), 33.16 MiB | 30.53 MiB/s, done.
Resolving deltas: 100% (66/66), done.
Error: Invalid cask: /usr/local/Homebrew/Library/Taps/gravitl/homebrew-netclient/Casks/netclient.rb
Cask 'netclient' is unreadable: /usr/local/Homebrew/Library/Taps/gravitl/homebrew-netclient/Casks/netclient.rb:3: unexpected fraction part after numeric literal
version 0.14.1
^~~~
Error: Cannot tap gravitl/netclient: invalid syntax in tap!
The install command returns 404 error, because of missing v
before the version number. If I fix it:
url "https://github.com/gravitl/homebrew-netclient/releases/download/v#{version}/netclient.tgz"
It still fails to find the directory and I'm not sure why:
> brew install netclient
==> Downloading https://github.com/gravitl/homebrew-netclient/releases/download/v0.14.0/netclient.tgz
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/f53fd9f8f7bd6272cb3265cbc321a700245cfbcd1abca4c79459f009185d9ba8--netclient.tgz
All formula dependencies satisfied.
==> Installing Cask netclient
==> Running installer script '/opt/homebrew/Caskroom/netclient/0.14.0/install.sh'
Password:
env: /opt/homebrew/Caskroom/netclient/0.14.0/install.sh: No such file or directory
==> Purging files for version 0.14.0 of Cask netclient
Error: Failure while executing; `/usr/bin/sudo -E -- /usr/bin/env PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin /opt/homebrew/Caskroom/netclient/0.14.0/install.sh` exited with 127. Here's the output:
env: /opt/homebrew/Caskroom/netclient/0.14.0/install.sh: No such file or directory
It seems there is also only a x86 binary in the tgz archive now and install.sh
doesn't handle M1 installations (/opt/homebrew
instead of /usr/local
).
No response
Running brew audit netclient
as advised from the install guide, fails.
Looks like the fileserver.netmarker.org
isn't part of the URL accepted for the cask. And there isn't an uninstaller.
v0.15.2
Mac
audit for netclient: failed
- The URL's domain fileserver.netmaker.org does not match the homepage domain github.com, a 'verified' parameter has to be added to the 'url' stanza. See https://docs.brew.sh/Cask-Cookbook#when-url-and-homepage-domains-differ-add-verified
- installer and pkg stanzas require an uninstall stanza
Error: 2 problems in 1 cask detected
when I want to install netclient by brew, showed an error after execute tap command. my device is mac m1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.