cli
cli copied to clipboard
Unable to install heroku-cli on aarch64 architecture
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
In the install script for heroku-cli, the ARM check tests the output of uname -m
against the pattern arm*
.
This does not work for aarch64
architecture, which is the same as arm64
.
Output:
$ uname -m
aarch64
$ curl -s https://cli-assets.heroku.com/install.sh | sh
unsupported arch: aarch64
Steps to reproduce:
- Launch a docker container using
centos:latest
withaarch64
architecture. - Try installing heroku-cli
What is the expected behavior?
The install script should check for both arm*
and aarch*
.
Current heroku version: heroku/7.47.13 linux-arm64 node-v15.9.0
The arm64 version runs just fine on aarch64 (which it should, since it's arm64).
Temporary workaround
By replacing the arm*
check with aarch*
, the install script works.
This is a pretty dirty hack though and should really not be needed.
# replace arm* check with aarch* if you're affected by this bug
curl -s https://cli-assets.heroku.com/install.sh | sed 's/arm\*/aarch\*/g' | sh
Altho the suggested fix was added in & now probably works on Pi, still did not work on Apple M1
arch -x86_64 sudo /bin/zsh -c "(curl https://cli-assets.heroku.com/install.sh | sh)"
arch -x86_64 sudo /bin/zsh -c "(curl https://cli-assets.heroku.com/install.sh | sh)"
Note that this installs the x86_64 version. There is a native aarch64 version available, might as well install that one. MacOS emulates the x86_64 architecture pretty smoothly, but there's definitely some overhead.