dockermacoshomebrew

Homebrew - Error: Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins


Homebrew gives me this error on macOS Monterey while using it:

Error: Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins

How can I fix it?


Solution

  • As written here https://flaviocopes.com/homebrew-fix-permission-denied-apply2files/ ,

    if you had recently deleted Docker, you have to manually recreate the Docker folder:

    mkdir -p /Applications/Docker.app/Contents/Resources/cli-plugins
    

    Then run

    brew cleanup
    

    You should have fixed the issue!

    After that, you can delete the Docker application inside the Application folder