1

I am trying to start Flutter Gallery with flutter run -d macos. It fails:

...
Error: To set up CocoaPods for ARM macOS, run:
  arch -x86_64 sudo gem install ffi

Exception: Error running pod install

Running arch -x86_64 sudo gem install ffi does not help. Running flutter clean does not help too.

What can be missing?

I have Apple M1 Pro chip in my laptop. Can it be the reason?

  • My flutter version: 2.13.0-0.0.pre.776
  • The full console output is here.

1 Answer 1

4

Not sure if pod install solves your problem, but installing ffi is not enough. You must also run the pod commands using arch.

For example.

arch -x86_64 pod install --repo-update
Sign up to request clarification or add additional context in comments.

5 Comments

Here is what I got after running it in project directory: '[!] No `Podfile' found in the project directory.'
You need to run it in the ios directory of your app.
It seems it pushed things forward. Now I am getting the error "ProcessException: Process exited abnormally: xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH Command: /usr/bin/arch -arm64e xcrun xcodebuild -list -project Runner.xcodeproj". It seems I need to install xcode.
If you want to build for iOS, this is necessary. You can run flutter doctor which should help you getting started and setting up everything necessary.
@TimBrückner, you're a lifesaver :)) Cheers 🍻🍻🍻!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.