Mac M1 chip issues with rosetta, “attachment of code signature supplement failed: 1”
Asked Answered
C

10

26

I recently got a Mac with the apple M1 chip and I am having numerous problems running libraries and applications.

One such example is numpy. To provide context, I installed Python 3.9 and pip3 and then decided to use pip to install numpy. To test if Python 3.9 and numpy have been properly installed, I type in terminal python3. I next try importing numpy using the statement import numpy

I then get the error

/var/db/oah/e089a6709d38c1a085254c76a7cb592fcceddb3f234a4aa318bb4ec25fe40d27/a37f39d2b061393d7731233ae89d90cd87c97f4edeeb46a78ad791/_multiarray_umath.cpython-39-darwin.so.aot: attachment of code signature supplement failed: 1
zsh: trace trap  python3

I have the exact same error when trying to open other applications (eg. SonicWall Mobile Connect) from the apple app store. If anyone has any insight to how to resolve this rosetta error it would be very much appreciated.

Cheers!

Cattail answered 1/7, 2021 at 4:26 Comment(0)
D
39

One of the following will fix the issue IMHO.

  1. Restart Mac OS.
  2. Upgrade OS (will restart after the upgrade)
  3. Upgrade Docker, Upgrade OS, restart.

I had the same issue on Apple Silicon (M1Pro) running on Mac OS Monterey (12.0). I installed Rosetta2 and problem persisted. I deleted and reinstalled Docker but that did not fix the problem. After reading other answers on this question, I realized that for some people, OS upgrade was solving the problem.

Donettedoney answered 1/11, 2021 at 18:32 Comment(9)
Number 1 fixes it for me with Monterey; usually a problem with After Effects and not Docker but I've no doubt this will come up there too as I use bothDegenerate
A restart also fixed it for me. I checked my uptime before I rebooted, and it started happening at around 30 days uptime (last reboot was the 12.0.1 update, it started around 3 days ago). I guess the more stable the OS becomes the more likely this is to happen 😅Dishwater
macOS 12.0.1 Monterey: A restart fixed it for meReflation
Updating macOS also solved it for me. I was getting a "Kernel Restarting: The kernel appears to have died. It will restart automatically" message from Jupyter that was hiding this issue.Higherup
Restarting helped meGermanous
restarting worked but the error came back few hours later.Conservatoire
As a temp fix, you can remove your bin directory everytime you run, eg: rm -rf ./bin && dotnet runSensitize
First tried docker upgrade; didn't work. Restarting worked for me. On Ventura 13.3.1 with M1 macOshaughnessy
Hi there. This solved the problem for my team who use M1 or M2 macs. Is there any information on why a restart works and seems to solve memory allocation issues?Anthropomorphism
H
12

FWIW - Same behaviour on macOS Monterey 12.6.1. Simple restart solved the problem. Nothing else was required.

Hulse answered 5/1, 2023 at 21:14 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Szombathely
L
10

What worked for me:

Verify that Rosetta is installed on your Mac. Rosetta should be installed automatically when you try to run an Intel-based application on an Apple Silicon Mac. If it's not installed, you can manually install Rosetta using the following command:

softwareupdate --install-rosetta
Lemaster answered 1/8, 2023 at 8:29 Comment(3)
Fixed it for me too. Was having multiple problems with random apps just not working anymore. Seems like somehow one of the ventura updates must have broken rosetta for me. Thanks!Adductor
I have MacOS ventura and after updating to Visual studio for mac 17.6.5 I was Facing the issue.. softwareupdate --install-rosetta this helped me to resolve the issueEmlynne
I was running into issues with Docker Desktop on my M1 MBP and this resolved the issue. The error I was getting was: npx expo run:android Error: rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2Commoner
R
5

This was happening to me a lot. Restarting fixed the issue but it would happen again soon after. Restarting so often would be a pain.

This answer on another question helped me fix the issue without having to restart:

dotnet clean

https://mcmap.net/q/535700/-dotnet-watch-run-gives-me-a-rosetta-error-attachment-of-code-signature-supplement-failed-1-after-save

Rabi answered 10/1, 2023 at 10:40 Comment(0)
D
3

The same problem has occurred for me as well, but with Big Sur 11.5 update as another comment has pointed out before me.
What I did to fix the error was to update from Big Sur 11.5 to Big Sur 11.6.
From there the issue resolved itself for me.

Ducktail answered 21/9, 2021 at 7:42 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Szombathely
W
3

I am using M1 Mac Monterey 12.3.1, I had to switch over to using Docker Compose V2. After I did this and restarted the Docker for Mac engine client app, the CLI started working again (though the buttons in the app still gave errors).

Good luck!

Preference Docker Compose v2

Witling answered 2/5, 2022 at 15:37 Comment(1)
In my case, I had to disable Docker Compose V2 for this to work on my M1 running Ventura 13.4. Thanks for the hint!Invercargill
C
2

As it turns out this was an Apple software issue. (I believe it was update 11.4, but I am not 100% sure.) After doing the software update the rosetta issue disappeared and all of the software that was having problems with it earlier now function properly.

Cattail answered 14/7, 2021 at 6:8 Comment(2)
I had the same issue, upgrading from macOS 11.4 to 11.5 fixed the issue for me as well.Pallid
Already I upgraded my macOS to 11.5, Now I am having the same error for Eclipse app rosetta error: /var/db/oah/22326....etc/eclipse./eclipse.aot: attachment of code signature supplement failed: 3 Trace/BPT trap: 5 Can anyone know the solution pls comment hereExasperation
D
0

I faced similar issue after upgrading to Monterey 12.3.1, tried restarting MacOS but that didn't help.

Later figured out that I was not able to build java applications using Java 8 but Java 11 applications were running fine.

Issue got resolved after installing java 11 from https://www.oracle.com/java/technologies/downloads/#java11-mac

Dahliadahlstrom answered 16/5, 2022 at 4:32 Comment(0)
A
0

I just upgraded my OS to macOS Ventura. Then suddenly certain commands in terminal stopped working.

All I had to do was:

  1. Quit Terminal
  2. Disable 'Open Using Rosetta'
  3. Open Terminal again.
Acrodont answered 12/5, 2023 at 14:32 Comment(0)
D
-3

I just had the same problem and I realized that I had the AMD64 binary.

file /Applications/SnowSQL.app/Contents/MacOS/snowsql /Applications/SnowSQL.app/Contents/MacOS/snowsql: Mach-O 64-bit executable x86_64

I used Homebrew to install, i.e.

brew install --cask snowflake-snowsql
Dependency answered 16/11, 2022 at 20:4 Comment(2)
Question is not related to SnowSQL.Wrenn
The particular example of SnowSQL is not really an issue. However, Rosetta is intended to allow running of amd64 executables on arm64, so this ultimately misses the point.Mcquillin

© 2022 - 2024 — McMap. All rights reserved.