Flutter Doctor gives Bad Cpu Type in executable
Asked Answered
W

5

8

I'm using Mac mini , MacOs monterey and m1 chip. When trying to setup flutter, it is giving error. command: flutter doctor o/p: /Users/admin/Desktop/flutter/bin/internal/shared.sh: line 229: /Users/admin/Desktop/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable

I have tried below command but it is also not working, Terminal command: sudo softwareupdate --install-rosetta --agree-to-license Terminal output: By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms. If you do not agree, press CTRL-C and cancel this process immediately. Rosetta 2 update is not available

Wellknit answered 17/11, 2021 at 6:16 Comment(0)
W
0

My mistake was that , I had installed flutter sdk before installing the Rosetta. So that's why it was giving the above error. So, to resolve this, I removed the flutter sdk and installed rosetta first then again installed flutter and it worked properly.

Wellknit answered 8/12, 2022 at 7:35 Comment(1)
i dont think you need to uninstall flutter. just enough to install rosettaHanover
O
17

you have to install rosetta first. In your terminal type:

/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Oliy answered 2/12, 2021 at 17:32 Comment(0)
H
11

I got this error on MacOs VMware and finaly I realized that i was downloaded the flutter sdk for arm Architecture, but i need this for x64 (intel) Architecture.

Hierology answered 22/9, 2022 at 15:17 Comment(0)
K
3

On macOs accidentally I downloaded arm architecture than x64 version. Download proper version as per the system requirements.

Kook answered 6/12, 2022 at 12:6 Comment(0)
T
2

run "softwareupdate --install-rosetta" in the terminal

Toth answered 9/2, 2022 at 6:9 Comment(0)
W
0

My mistake was that , I had installed flutter sdk before installing the Rosetta. So that's why it was giving the above error. So, to resolve this, I removed the flutter sdk and installed rosetta first then again installed flutter and it worked properly.

Wellknit answered 8/12, 2022 at 7:35 Comment(1)
i dont think you need to uninstall flutter. just enough to install rosettaHanover

© 2022 - 2025 — McMap. All rights reserved.