Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first run "Flutter Doctor", Bad CPU type in executable #74511

Closed
OverYoung opened this issue Jan 22, 2021 · 3 comments
Closed

first run "Flutter Doctor", Bad CPU type in executable #74511

OverYoung opened this issue Jan 22, 2021 · 3 comments
Labels
found in release: 1.25 Found to occur in 1.25 platform-host-arm Building on an ARM-based platform platform-mac Building on or for macOS specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@OverYoung
Copy link

OverYoung commented Jan 22, 2021

PC:MacBook Air 2021 Apple M1 hardcore
Flutter version:Stable Channel 1.22.5 & Beta Channel 1.25.0-8.3.pre
After installed Flutter and the environment variable be set, run "Flutter doctor", error occurred.

What happened with my operation in terminal:

Last login: Sat Jan 23 02:12:12 on ttys000
yangzan@yangzandeMacBook-Air ~ % which flutter 
/Users/yangzan/development/flutter/bin/flutter
yangzan@yangzandeMacBook-Air ~ % flutter doctor
Downloading Dart SDK from Flutter engine 7a8f8ca02c276dce02f8dd42a44e776ac03fa9bc...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  173M  100  173M    0     0  10.9M      0  0:00:15  0:00:15 --:--:-- 11.0M
Building flutter tool...
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (8 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (7 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (6 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (5 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (4 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (3 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (2 tries left)
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
/Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /Users/yangzan/development/flutter/bin/cache/dart-sdk/bin/dart: Undefined error: 0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (1 tries left)
Command 'pub upgrade' still failed after 10 tries, giving up.
yangzan@yangzandeMacBook-Air ~ % 
@timsneath timsneath added found in release: 1.25 Found to occur in 1.25 platform-host-arm Building on an ARM-based platform tool Affects the "flutter" command-line tool. See also t: labels. platform-bigsur Issues related to macOS Big Sur platform-mac Building on or for macOS specifically and removed platform-bigsur Issues related to macOS Big Sur labels Jan 22, 2021
@little51
Copy link

install rosetta first
/usr/sbin/softwareupdate --install-rosetta --agree-to-license

@OverYoung OverYoung reopened this Jan 25, 2021
@OverYoung
Copy link
Author

@little51 @timsneath

install rosetta first
/usr/sbin/softwareupdate --install-rosetta --agree-to-license

deal

@github-actions
Copy link

github-actions bot commented Aug 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
found in release: 1.25 Found to occur in 1.25 platform-host-arm Building on an ARM-based platform platform-mac Building on or for macOS specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

3 participants