Home > database >  Flutter commands are not running
Flutter commands are not running

Time:07-04

I'm trying to run the flutter commands but it gives me this error

Flutter failed to write to a file at
"/usr/local/Caskroom/flutter/3.0.3/flutter/bin/cache/flutter_version_check.sta
mp".
Please ensure that the SDK and/or project is installed in a location that has
read/write permissions for the current user.
Try running:
  sudo chown -R $(whoami)
  /usr/local/Caskroom/flutter/3.0.3/flutter/bin/cache/flutter_version_check.st
  amp

please help how to fix this issue.

CodePudding user response:

You have to give permission to your username to access that folder

sudo chown -R <your_username> /flutter_sdk_path/

CodePudding user response:

Check permission for the mentioned directory via:

ls -l /usr/local/Caskroom/flutter

Then run this command:

sudo chown -R [user]:root /opt/flutter
  • Related