Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh: permission denied when trying to use flutter

Tags:

flutter

dart

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.

like image 340
IB MR Avatar asked Nov 18 '20 14:11

IB MR


Video Answer


3 Answers

I faced this issue when setting up Flutter on my new mac, even after setting the PATH correctly. Turns out i installed the wrong SDK (Window). So make sure to install the correct Flutter SDK on your respective OS.

For MacOS : https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

For Window : https://flutter.dev/docs/development/tools/sdk/releases?tab=windows

like image 188
Sunn Avatar answered Oct 08 '22 01:10

Sunn


Make sure you've installed the correct SDK for your machine. For me I had installed Flutter's Windows SDK on my Mac machine.

For macOS : https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

For Window: https://flutter.dev/docs/development/tools/sdk/releases?tab=windows

like image 2
Slick Slime Avatar answered Oct 08 '22 02:10

Slick Slime


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

  • Go to flutter folder
  • Empty folder
  • Open terminal and go to the flutter folder
  • git clone https://github.com/flutter/flutter.git -b stable
like image 2
Cem Sekiz Avatar answered Oct 08 '22 03:10

Cem Sekiz