Homebrew install problems: Permission denied - /Library/Caches/Homebrew/Formula/libksba.brewing

6

0

I've been having problems installing Homebrew since changing my home username on my Mac OSX 10.6.8 computer. After removing all files from the previous Homebrew installation since that didn't work, I installed it again. When I run brew doctor, it says:

Warning: Suspicious git origin remote found.

With a non-standard origin, Homebrew won't pull updates from
the main repository. The current git origin is:


Unless you have compelling reasons, consider setting the
origin remote to point at the main repository, located at:
  https://github.com/mxcl/homebrew.git

It wouldn't let me install git (I did it with the package installer) and now when I try to run brew install libksba, it says:

Error: Permission denied - /Library/Caches/Homebrew/Formula/libksba.brewing

I've tried doing chown and looking up anything that would help but I'm not finding anything. Any chance anyone knows how to fix this?

Anoel

Posted 2013-02-12T23:40:57.900

Reputation: 161

What exactly did you change ("home username")? And how did you install Homebrew? It looks like Homebrew's git origin is blank, which shouldn't happen, so this might be something to ask the Homebrew developers. – echristopherson – 2013-02-13T00:14:50.723

I changed my account name so what you see after, -Macbook-Pro: ~home username in the Terminal. I had to delete a past install and then I used the curl script on the homepage for it. – Anoel – 2013-03-02T23:44:03.037

Answers

10

Running this command fixed it for me just now (I was having the same problem)

sudo chown -R ${USER} /Library/Caches/Homebrew/

Shane Creighton-Young

Posted 2013-02-12T23:40:57.900

Reputation: 211

4

What does "ls -al /Library/Caches/Homebrew/Formula/libksba.brewing" look like?

The file may be owned by another user on you computer, probably from brew update etc. Try giving write permissions to group.

sudo chmod g+w /Library/Caches/Homebrew/Formula/libksba.brewing

cgl

Posted 2013-02-12T23:40:57.900

Reputation: 140

1

I also changed my account name, although it's not clear the brew issue is related. In any case, run 'brew update' from the command line, to pull down the latest updates (bug fixes), then 'brew doctor' again to confirm you're all good.

gcbrink

Posted 2013-02-12T23:40:57.900

Reputation: 11

I did that, it downloaded the last updates, brew doctor says I'm good but it still says the same thing. – Anoel – 2013-03-02T23:44:27.967

1

I was running into the same problem and changing the permissions on the Homebrew folder fixed my problem. Simply run the following command:

sudo chmod -R g+w /Library/Caches/Homebrew

Thanks to @cgl for suggesting changing the folder permissions.

TheIT

Posted 2013-02-12T23:40:57.900

Reputation: 111