-1

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:

  1. I download Flutter stable version for Apple Silicon at https://docs.flutter.dev/get-started/install/macos
  2. I put the unzipped file into my $HOME/Developer folder
  3. Since I use zshell, in the $HOME/.zshrc file, I do: export PATH="$PATH:$HOME/Developer/flutter/bin"
  4. I restart the terminal or I do source .zshrc
  5. I check if which flutter and echo $PATH, and it's all ok
  6. 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 Answers2

0

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.

belinda.g.freitas
  • 1,016
  • 3
  • 7
  • 15
  • Excuse me, where exactly I have this extra '/flutter' ? I have, on both Macs, the .zshrc open, and the PATH is the same. Then, I think that the /flutter does not refer to a folder but to the executable file, which I checked, and it's named flutter. What's strange is that, if I move into the bin folder, the second error goes away, but the first keeps. While in the other computer, I can run flutter doctor or whatever from ~ directory – Massimiliano Piccinini Apr 05 '23 at 16:36
  • Honestly I don't know why or how it could add that _/flutter_ a the end. Try to restart the computer and setting the PATH again ending flutter path at _/bin_. – belinda.g.freitas Apr 06 '23 at 08:27
0

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