有人可以提出以下决议吗?
使用git运行一些东西必须有一个简单的方法。
$ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Press ENTER to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Counting objects: 142460, done.
remote: Compressing objects: 100% (49574/49574), done.
remote: Total 142460 (delta 97359), reused 136688 (delta 91829)
Receiving objects: 100% (142460/142460), 33.23 MiB | 1.57 MiB/s, done.
Resolving deltas: 100% (97359/97359), done.
From https://github.com/mxcl/homebrew
* [new branch] master -> origin/master
HEAD is now at 8cb0f87 brew-test-bot: fix testing job tag numbering.
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
$ brew doctor
Warning: Your file-system on / appears to be CaSe SeNsItIvE.
Homebrew is less tested with that - don't worry but please report issues.
$ brew update
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failed to update tap: homebrew/science
Already up-to-date.
$ brew untap homebrew/science
Error: No such tap!
$
答案 0 :(得分:10)
Dan R评论道:
brew更新还可以更新在/ usr / local / Library / Taps / * /中找到的git存储库(我刚刚在/usr/local/Library/Taps/homebrew-dupes/.git中发生了这种情况)。检查那里的权限。我不确定brew清理能否清除它。
我的问题是关于cask
[/usr/local/Library/Taps/phinze-cask]
$ brew update
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failed to update tap: phinze/cask
Already up-to-date.
[/usr/local/Library/Taps/phinze-cask]
$ ls -laF .git/objects | grep root
drwxr-xr-x 3 root admin 102 Dec 2 11:43 05/
drwxr-xr-x 3 root admin 102 Dec 2 11:43 08/
drwxr-xr-x 3 root admin 102 Dec 2 11:43 2f/
...
在以下chown之后,我完成了干净的brew更新。
[/usr/local/Library/Taps/phinze-cask]
$ sudo chown -Rh ljohnson:admin .git
[/usr/local/Library/Taps/phinze-cask]
$ brew update
Updated Homebrew from 04e337db to 04e337db.
==> New Formulae
phinze/cask/curse-client phinze/cask/plug phinze/cask/undercover
==> Updated Formulae
phinze/cask/armitage phinze/cask/plex-media-server phinze/cask/squirrel phinze/cask/textadept phinze/cask/tunnelbear phinze/cask/vienna-rss
phinze/cask/avidemux phinze/cask/seamonkey phinze/cask/tapaal phinze/cask/totalfinder phinze/cask/twitterrific phinze/cask/vistrails
phinze/cask/fritzing phinze/cask/sqleditor phinze/cask/teamspeak-client phinze/cask/totalspaces phinze/cask/vagrant