I have created a new user 'dad' on my macbook pro (OSX 10.8.4). 'dad' is an administrator. I've successfully installed homebrew as 'dad'. It was previously installed by another user. I did:
sudo chown -R dad /usr/local/ cd /usr/local/ chmod -R 777 *
But any attempt to install, e.g:
brew install nmap
Gives:
Error: Permission denied - /Library/Caches/Homebrew/Formula/nmap.brewing
It seems nmap.brewing doesn't exist:
dad$ ls -l /usr/local/Library/Caches/Homebrew/Formula/nmap.brewing ls: /usr/local/Library/Caches/Homebrew/Formula/nmap.brewing: No such file or directory dad$ ls -l /Library/Caches/Homebrew/Formula/nmap.brewing ls: /Library/Caches/Homebrew/Formula/nmap.brewing: No such file or directory
Any ideas?
Fixed.
It seemed I needed to take ownership of /Library/Caches/Homebrew
sudo chown -R $USER /Library/Caches/Homebrew/
Searching the brew manpage for /Library/Caches/Homebrew
, it turns out that you can set the directory that homebrew uses for caching with the the HOMEBREW_CACHE
environment variable, or just create ~/Library/Caches/Homebrew
. These approaches will be easier than the chown
approach if you’re a non-administrator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With