cli icon indicating copy to clipboard operation
cli copied to clipboard

Unable to install heroku-cli on aarch64 architecture

Open SplittyDev opened this issue 4 years ago • 3 comments

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 with aarch64 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

SplittyDev avatar Feb 19 '21 15:02 SplittyDev

Altho the suggested fix was added in & now probably works on Pi, still did not work on Apple M1

ggirton avatar Jan 11 '22 23:01 ggirton

arch -x86_64 sudo /bin/zsh -c "(curl https://cli-assets.heroku.com/install.sh | sh)"

lpender avatar Mar 08 '22 20:03 lpender

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.

SplittyDev avatar May 11 '22 21:05 SplittyDev