Homebrew updating problem

There are two common problem when updating brew.

Permission denied

brew update Homebrew/.git/FETCH_HEAD: Permission denied

When you run brew doctor, you can find there some permission problem with the /usr/local/ files.

image

You should change the permission, run this:

sudo chown -R YOURNAME:admin /usr/local

Could not read Username

brew update fatal: could not read Username for ‘https://github.com': terminal prompts disabled

1
2
3
4
5
6
7
8
# laker @ Laker in ~ [11:03:59] C:1
$ brew update
git: 'credential-osxkeychain' is not a git command. See 'git --help'.git: 'credential-osxkeychain' is not a git command. See 'git --help'.

fatal: could not read Username for 'https://github.com': terminal prompts disabled
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Error: homebrew/homebrew-x11 does not exist! Run 'brew untap homebrew/homebrew-x11'
homebrew/homebrew-dupes does not exist! Run 'brew untap homebrew/homebrew-dupes'

Run the command it recommend:

1
2
3
4
5
6
7
8
9
# laker @ Laker in ~ [11:05:57] C:1
$ brew untap homebrew/homebrew-x11
Untapping homebrew/x11...
Untapped (242 files, 224.9KB).

# laker @ Laker in ~ [11:06:39]
$ brew untap homebrew/homebrew-dupes
Untapping homebrew/dupes...
Untapped 36 formulae (277 files, 263.5KB).

Then we can update sucessfully:

1
2
3
# laker @ Laker in ~ [11:06:44]
$ brew update
Already up-to-date.

Homebrew updating problem

本文原创自http://laker.me/blog,转载请注明出处,欢迎交换友链

如果本文对您有帮助,微信扫一扫,请我吃个鸡腿吧