cli
cli copied to clipboard
CLI installer fails on ARM Macs
Hello team,
I want report a bug that seems to only appear on the newly released Apple computers that use an ARM based chip.
What is the current behavior?
I want to install the cli tool using the cli installer shell script on a new Macbook Air, which has an ARM based chip. In order to achieve that, I open the default Mac OS Terminal application and type the command
curl https://cli-assets.heroku.com/install.sh | sh
The installer starts it's work, asks for a password, but ends with the error message tar: Error opening archive: Unrecognized archive format. After that, the cli tool is not installed.
What is the expected behavior?
The expected behavour is that using the mentioned command, the installer is able to install the heroku cli tool. The MacOS version is the latest one and the tar command is working for other files. The computer is not behind a firewall or proxy and is connected to a DSL connection.
Here is a screenshot of the output:

For clarification, I do know that the heroku docs want me to use homebrew, but I have reasons not to. The shell script itself (https://cli-assets.heroku.com/install.sh) used to and still does support Macs (it has several mentions of Darwin in the code). If it does no longer support Macs, it should prompt an error message saying that the support has ended and people must use homebrew now.
Ideas / Suggestions
You can see in the screenshot, that the installer is trying to download the file https://cli-assets.heroku.com/heroku-darwin-arm.tar.gz, which does not actually exist on heroku's servers (404 status code). So I think the error is not about the tar command, but about the file not existing yet. If the shell script does not support ARM based Macs, I would prefer seeing a message that clearly says that heroku cli does not work on ARM Macs. Otherwise, I would love to see the file to actually exist. ;)
Thank you for your great work. Looking forward to discussing this further. :)
Hey @FlorianH check this PR https://github.com/heroku/cli/pull/1705/files, it helped me to fix this. while it isnt merged I just used a local copy of the install script and runs fine
@FlorianH It looks like the mentioned fix PR #1705 has been merged. Mind letting us know if that resolves your issue?
Hello, I also have this issue as of this morning. The installer script knows what the architecture is - the problem is that you're not currently building the arm target for darwin.
Specifically:
- [EXISTS] https://cli-assets.heroku.com/heroku-darwin-x64.tar.xz
- [DOES NOT EXIST] https://cli-assets.heroku.com/heroku-darwin-arm.tar.xz
- [EXISTS] https://cli-assets.heroku.com/heroku-linux-x64.tar.xz
- [EXISTS] https://cli-assets.heroku.com/heroku-linux-arm.tar.xz
I think someone on your end needs to add a build configuration for ARM Darwin.
Hey, shouldn't someone look into this? M1 macs are almost certainly the majority of the fleet now and you don't support them.
@the80srobot thank you for commenting. We do have some documentation that might help resolve this for you for now. If that resolves your issue, would please let us know?
That does not really resolve it.
I am able to use the Heroku CLI for x86 using Rosetta, but it requires manually tweaking the install.sh script. I can do that, but, like… Do you really want what today is probably the majority of your customers to be manually fixing your installation script?
If you can’t produce ARM binaries (which, like, why?!) then you probably should at least have the install.sh script download the x86 binaries instead of exploding.
Best, Adam
On Dec 5, 2022, at 4:48 PM, Katy Bowman @.***> wrote:
@the80srobot https://github.com/the80srobot thank you for commenting. We do have some documentation https://devcenter.heroku.com/articles/heroku-cli#apple-silicon-issues that might help resolve this for you for now. If that resolves your issue, would please let us know?
— Reply to this email directly, view it on GitHub https://github.com/heroku/cli/issues/1731#issuecomment-1337604226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMUD6V3VGZLEGI2EYLNHLLWLYFDVANCNFSM4WUAMTGA. You are receiving this because you were mentioned.
@the80srobot thank you so much for the input.
Hah. I'm not trying to be snarky, I'm just surprised it doesn't come up more often, since M1 macs are really common?
Anyway, here's what I do to get Heroku working on one:
- Download
https://cli-assets.heroku.com/install.sh - Find the line that starts
ARCH=and remove it and the if-elif-else-fi block under it. - Replace those lines with
ARCH="x86_64"
If you have Rosetta enabled, things will now install normally.
I am sure if someone at Salesforce would just try it, you'll see install.sh doesn't work.
Thank you for adding your steps, that's very helpful. We'll look into it as soon as we're able.
The installer script still fails on M1 Macs because the tarball is named differently to what the script generates.
Hi, curious why this was closed. Running curl https://cli-assets.heroku.com/install.sh | sh on my M2 Mac gives unsupported arch: arm64. I don't wish to install Homebrew. Can someone point me to the latest info on this topic? Thanks.