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?

Replies

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.