macbook@macbooks-MacBook-Pro ~ % flutter doctor
/Users/macbook/Downloads/flutter/bin/internal/shared.sh: line 235: /Users/macbook/Downloads/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
A sudden error on the flutter terminal after converting into bash.
currently, I convert the bash terminal to zsh
terminal. still, the same error is showing while running flutter commands.
2
Answers
Do following steps:
add these lines to
.zhrc
file:run this command:
and finally, check everything is fine:
Since you mentioned that the error started happening after converting your terminal from Bash to Zsh, it’s possible that the shell change might have affected your environment settings. It’s essential to ensure that your Flutter installation and Dart SDK are compatible with your system architecture.
Here are some steps to troubleshoot and resolve the issue:
uname -m
Update your PATH variable to point to the new Flutter installation.