zsh: permission denied when trying to use flutter

Viewed 18047

I have been working with flutter for a week now and it runs okay, however I can't use commands such as flutter doctor or flutter upgrade on my terminal nor Android studio. Whenever I try to run a flutter command I get

zsh: permission denied: /Users/name/flutter/bin.

I tried adding the source to nano ~/.zshrc and export PATH, but nothing worked.

5 Answers

If you added the path and sure that you have downloaded the correct os files and still get the error:

Run below command in the terminal, it worked for me

export PATH="/<full-path-of-flutter-folder>/bin:$PATH"

add the sudo prefix to your command. I guess you are not the admin.

eg: sudo flutter doctor

Related