Last active
April 26, 2024 06:51
-
-
Save irazasyed/7732946 to your computer and use it in GitHub Desktop.
Homebrew: Permissions Denied Issue Fix (OS X / macOS)
您的邮件已经收到。谢谢
You save my life
您的邮件已经收到。谢谢
Thank you, you are amazing
None of the above worked for me. Keep getting permissions errors when updating homebrew.
Example Permission Denied Error:
/Users/{insert username}/Library/Caches/Homebrew/api/formula_names.before.txt: Permission denied
The solution that worked was just deleting the cache files:
sudo rm -rf ~/Library/Caches/Homebrew/
Additionally, ran the following for good measure:
sudo chown -R {your username}:admin ~/Library/Caches/Homebrew/ sudo chmod -R 755 ~/Library/Caches/Homebrew/
Then reinstall Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Worked for me. thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the command changes the ownership of all files and directories within the Homebrew installation directory to the current user, effectively giving the current user full control over these files and directories.
i'm just coming from linux, it didn't hit me that could be the problem. like mention above this will break when you add another user. the solution by @VGerris would be much better if potentially you'd want to have other users in the system