Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kenmori/6238130f54337c7e8026f893228c2273 to your computer and use it in GitHub Desktop.
Save kenmori/6238130f54337c7e8026f893228c2273 to your computer and use it in GitHub Desktop.
[Permission denied] fatal: cannot copy '/Library/Developer/CommandLineTools

When you install HomeBrew, the console might show you fllowing code

fatal: cannot copy '/Library/Developer/CommandLineTools/usr/share/git-core/templates/hooks/fsmonitor-watchman.sample' to '/usr/local/Homebrew/.git/hooks/fsmonitor-watchman.sample': Permission denied
Failed during: git init -q

You are not permit to copy that directory, so you have to give this directory permision

Run fllowing code as change it

sudo chown -R $USER /usr/local

run agin this code as install homebrew.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@Himaja19
Copy link

Thank you! this worked for me.

@artivnv
Copy link

artivnv commented Mar 18, 2020

Thank you!

@sohan-shingade
Copy link

Thank you man very helpful!!!!!!!!!!

@talal1999
Copy link

Thanks. Very helpful !

@pitkane
Copy link

pitkane commented Aug 21, 2020

Thank you 👍

@joulgs
Copy link

joulgs commented Mar 11, 2023

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment