7

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

5 Answers5

13

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

/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Br0wn
  • 544
  • 3
  • 19
8

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.

Milad jalali
  • 622
  • 9
  • 10
1

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

who-aditya-nawandar
  • 1,334
  • 9
  • 39
  • 89
1

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

Aditya Patil
  • 1,287
  • 12
  • 19
-2

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.