I’m on a MacBook Pro with M2 Pro, I’m trying to install Flutter. I already used Flutter with my Previous MacBook Pro Intel based.
Basically, I can install it but there are some path or code problems.
These are the steps I do:
- I download Flutter stable version for Apple Silicon at https://docs.flutter.dev/get-started/install/macos
- I put the unzipped file into my $HOME/Developer folder
- Since I use zshell, in the $HOME/.zshrc file, I do: export PATH="$PATH:$HOME/Developer/flutter/bin"
- I restart the terminal or I do source .zshrc
- I check if
which flutter
andecho $PATH
, and it’s all ok - I try running flutter doctor, or whatever other flutter command (even flutter -v), but I always get the same error:
/Users/Massi/Developer/flutter/bin/flutter: line 40: cd: : No such file or directory /Users/Massi/Developer/flutter/bin/flutter: line 61: /Users/Massi/internal/shared.sh: No such file or directory
Two days I’m on this problem and could not figure it out
2
Answers
You said you did
export PATH="$PATH:$HOME/Developer/flutter/bin
but in the PATH it shows/Users/Massi/Developer/flutter/bin/flutter
. You have an extra/flutter
at the end, it’s probably the problem. Try to correct the PATH.I recently bought a mac mini M1 and I installed Flutter by following the attached video https://www.youtube.com/watch?v=McxVTgG_E1Y. Note that is the first time that I have an actual interaction with macOS and that video helped me a lot. You can try a clean installation by following this tutorial