akshay yadav
akshay yadav

Reputation: 484

flutter doctor error in macOs high sierra

enter image description hereflutter doctor command show operation not permitted in macOS

I don't know why when. I run flutter doctor it's showing zsh: operation not permitted: flutter

Upvotes: 0

Views: 1921

Answers (4)

Jadent
Jadent

Reputation: 1414

It may be that macOS has applied a quarantine extended attribute to the Flutter Doctor executable. Find the full path to the executable in your Flutter installation and perform the steps below:

Check the extended attributes of the script by running:

xattr -l PATH/TO/FLUTTER-DOCTOR

If com.apple.quarantine is present in the list of attributes displayed then you need to remove that attribute.

You can do this using:

xattr -d com.apple.quarantine PATH/TO/FLUTTER-DOCTOR

Note that this same issue can occur with any bash script or executable including new scripts that you may write as part of your general workflow, CI scripts etc. I just ran into this on Ventura for a simple script to clean my development environment.

If macOS does decide to apply the quarantine attribute to a custom script then one last required step is to ensure that the script is still executable, which you can do using:

chmod +x PATH/TO/AFFECTED-SCRIPT.SH

Upvotes: 0

user21660155
user21660155

Reputation: 1

This is also the problem on my side. I disabled slp and gave full permissions but still reported errors:zsh: operation not permitted: flutter

Is there another solution?

Need help, thank you!

Upvotes: 0

Lewin Muzvonda
Lewin Muzvonda

Reputation: 475

If you have already allowed the terminal Full Disk Access under Security and P

Instead of downloading Flutter use git clone

https://github.com/flutter/flutter.git

Add your path example: export PATH="$PATH:$HOME/flutter/flutter/bin" (if the flutter folder is on the user home)

then you can do flutter doctor

Upvotes: 0

jaredbaszler
jaredbaszler

Reputation: 4809

Looks like you need to grant full disk access to terminal app. View the thread here on how to do that.

https://github.com/flutter/flutter/issues/65101

In the future, I would recommend a simple google search of your exact error before posting a new question. I found the solution above by searching "zsh: operation not permitted: flutter macOS"

Upvotes: 1

Related Questions