mike-engel / jwt-cli

A super fast CLI tool to decode and encode JWTs built in Rust
MIT License
1.02k stars 65 forks source link

bug: not able to use in macOS for Apple Silicon chip #303

Open meetzaveri opened 7 months ago

meetzaveri commented 7 months ago

Summary

I installed via homebrew like

brew install mike-engel/jwt-cli/jwt-cli

But I am facing this error when executing jwt help

zsh: bad CPU type in executable: jwt

Can I know any workaround or is there any support in the future for silicon chip ?

mike-engel commented 7 months ago

@meetzaveri thanks for the report! What version of jwt-cli are you running on? I have it installed locally on my M2 machine and running jwt --help works as expected:

λ uname -p;jwt -h
arm
A super fast CLI tool to decode and encode JWTs built in Rust

Usage: jwt <COMMAND>

Commands:
  encode  Encode new JWTs
  decode  Decode a JWT
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

I would also ask you to reinstall it through brew just in case.

jfrosch commented 7 months ago

Mike, I also had the same issue on a Mac M1 Pro. No issues on a Mac M2 Max, though.

On the M1, I uninstalled jwt-cli, upgraded the brew formula, and re-installed jwt-cli. Same error.

meetzaveri commented 7 months ago

@mike-engel It would have installed the latest version , I guess because I ran steps mentioned in the doc. FYI, I ran on mac m1

mike-engel commented 6 months ago

If anyone has cargo/rust installed and would be willing to compile this from source to see if that works, that would be very helpful!

aodj-kara commented 6 months ago

Mike, I also had the same issue on a Mac M1 Pro. No issues on a Mac M2 Max, though.

On the M1, I uninstalled jwt-cli, upgraded the brew formula, and re-installed jwt-cli. Same error.

I'm on an M2 Max and it doesn't work

$ brew install mike-engel/jwt-cli/jwt-cli
==> Fetching mike-engel/jwt-cli/jwt-cli
==> Downloading https://github.com/mike-engel/jwt-cli/releases/download/6.0.0/jwt-macOS.tar.gz
Already downloaded: /Users/alexander/Library/Caches/Homebrew/downloads/b6d2e4a316e17467f06644c904a85c6c383834b8ab496b2934cfda0026438a93--jwt-macOS.tar.gz
==> Installing jwt-cli from mike-engel/jwt-cli
🍺  /opt/homebrew/Cellar/jwt-cli/6.0.0: 4 files, 2.8MB, built in 1 second
==> Running `brew cleanup jwt-cli`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
$ jwt
zsh: bad CPU type in executable: jwt
theon commented 5 months ago

I also get the zsh: bad CPU type in executable: jwt when installing from brew with brew install mike-engel/jwt-cli/jwt-cli, but building from source with cargo it is working fine