Astra CLI on Linux via Homebrew fails with "exec format error: astra"

On Linux (Ubuntu 20.04), installing the Astra CLI with brew install datastax/astra-cli/astra-cli and running astra setup failed with: exec format error: astra. The homebrew formula was only set up to download the macOS binary, so Linux got a Mach-O executable it could not run.

The homebrew tap originally shipped only the macOS binary, so on Linux you got exec format error. The maintainer fixed the formula in 0.2.1 to install a portable Java-based build on Linux instead: run brew upgrade datastax/astra-cli/astra-cli to pick up the fixed version. Source: https://github.com/datastax/astra-cli/issues/28

Source: https://github.com/datastax/astra-cli/issues/28