flutter 설치 에러

승짱·2023년 4월 22일
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-arm64, locale ko-KR)
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information.
      Flutter requires the Rosetta translation environment on ARM Macs. Try running:
        sudo softwareupdate --install-rosetta --agree-to-license

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[!] Xcode - develop for iOS and macOS (Xcode 14.3)
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

M1맥북에서 flutter doctor 실행 시 첫번째 Flutter에러 발생.
느낌상 로제타 설치떄문에 그런거 같아서 구글링 해서 로제타 설치 후 에러 사라짐

터미널 창에 해당 명령어 입력 후 실행

// 1. 라이센스 동의 필요
softwareupdate --install-rosetta


// 2. 라이선스 자동 동의
/usr/sbin/softwareupdate --install-rosetta --agree-to-license

다음으로 보여지는 에러는 CococaPod이 설치되지 않았다는 에러인데

sudo gem install cocoapods

코드를 실행하면 버전 얘기가 나오면서 에러남.. 근데 그래서 찾아보니 버전을 지정해서 설치해주면 에러가 사라진다길래

sudo gem uninstall cocoapods -v 1.8.4

1.8.4 버전으로 설치를 하고 flutter doctor를 돌려보니
에러가 나있었고

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[!] Xcode - develop for iOS and macOS (Xcode 14.3)
    ! CocoaPods 1.8.4 out of date (1.11.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.

1.11.0 버전을 추천한다길래

sudo gem uninstall cocoapods -v 1.8.4

1.8.4 버전을 제거하고

sudo gem install cocoapods -v 1.11.0 

1.11.0버전으로 재설치 하니

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

에러 해결!

profile
Welcome to my memo

0개의 댓글