dtk: Bad CPU type in executable

I'm trying execute the x86_64 part of a binary in terminal using arch. For example:

me@my-Mac ~ % arch --x86_64 /bin/ls arch: posix_spawnp: /bin/ls: Bad CPU type in executable

Any ideas how to fix this?
Post not yet marked as solved Up vote post of tmurison Down vote post of tmurison
1.6k views

Answers

Try to install Xcode. That will pop a window saying Rosetta2 needs to be installed. After that your command should work. Good luck!
I installed Xcode, no pop up appeared. I installed it with "softwareupdate --install-rosetta" and didn't work. Still got the same error.