Installed Wasp on new machine, getting "Bad cpu type" error

I'm running an M4 Macbook Pro. Attempting to install wasp on the new system, and getting these errors: /Users//.local/bin/wasp: line 2: /Users//.local/share/wasp-lang/0.17.1/wasp-bin: Bad CPU type in executable /Users//.local/bin/wasp: line 2: /Users//.local/share/wasp-lang/0.17.1/wasp-bin: Undefined error: 0 I am assuming that something's wrong with how I put the path command into my .zshrc file but I copied it as instructed (export PATH=$PATH:/Users/<myuser>/.local/bin)
7 Replies
kapa.ai
kapa.ai3w ago
Hi @CamBlackwood. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The error message “Bad CPU type in executable” on your M4 MacBook Pro is not related to how you set your PATH in .zshrc. Instead, it’s because the Wasp installer currently provides only an x86_64 (Intel) binary for macOS, and your Mac uses an ARM64 (Apple Silicon) processor. The x86_64 binary cannot run natively on ARM64 without translation. Solution:
You need to install Rosetta, which allows your ARM-based Mac to run x86_64 binaries. You can install Rosetta by running this command in your terminal:
softwareupdate --install-rosetta
softwareupdate --install-rosetta
After installing Rosetta, try running Wasp again. This is a known limitation until a native ARM64 binary is provided for Wasp on macOS. The Wasp team is aware of this and plans to add ARM64 binaries in the future, but for now, Rosetta is required for Apple Silicon Macs, including M1, M2, M3, and M4 chips Quick Start: Installation Add macos arm64 binary package to our releases. Your PATH setup in .zshrc is correct and not the cause of this error. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @CamBlackwood, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
CamBlackwood
CamBlackwoodOP3w ago
@kapa.ai are you sure about that? I use wasp on other M chip machines and didn't install rosetta on those
kapa.ai
kapa.ai3w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Based on the official Wasp documentation and related discussions, the "Bad CPU type in executable" error on Apple Silicon (M1, M2, M3, M4) Macs is specifically mentioned as a result of Wasp providing only an x86_64 (Intel) binary for macOS. The docs state that if you encounter this error, you need to install Rosetta to run the x86_64 binary on your ARM-based Mac. The installation command for Rosetta is:
softwareupdate --install-rosetta
softwareupdate --install-rosetta
This is the recommended solution according to the official Wasp documentation Quick Start: Installation. However, it is possible that on some Apple Silicon machines, Rosetta was already installed (perhaps by another application or during initial setup), which would allow Wasp to run without you explicitly installing Rosetta yourself. This could explain why you did not need to install Rosetta on your other M-chip machines. To summarize:
- The official guidance is to install Rosetta if you see the "Bad CPU type in executable" error. - If Wasp worked on your other M-chip machines without installing Rosetta, it is likely Rosetta was already present on those systems. If you continue to experience issues after installing Rosetta, or if you believe Rosetta is already installed, there may be another problem, but based on the knowledge sources, Rosetta is required for running the current Wasp binary on Apple Silicon Macs Quick Start: Installation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @CamBlackwood, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
CamBlackwood
CamBlackwoodOP3w ago
that worked, thank you bot ❤️
isaiah
isaiah3w ago
til
Carlos
Carlos3w ago
in the past it might have been that you had already installed rosetta for another program so that you didn't have to do it explicitly for wasp, but yeah, rosetta is currently* a requirement for wasp (* currently because we've been building experimental native Apple Silicon builds for the past couple of releases, they're available on github releases if you're feeling adventurous)
CamBlackwood
CamBlackwoodOP3w ago
yeah that's almost certainly the case I think, given this is the first time I've set up wasp on an actual new machine! I was surprised I hadn't had to use rosetta for anything else yet 😂

Did you find this page helpful?