【发布时间】:2013-12-10 21:19:36
【问题描述】:
有人可以就以下问题提出解决方案吗?
必须有一个简单的方法,用 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!
$
【问题讨论】:
-
通常这意味着您的文件权限对于它试图写入的任何目录都搞砸了。执行
ls -l时检查是否有任何问题。 -
在第一行我正在做一个 rm -rf /usr/local/.git,所以所有的东西都是在第二行从头开始创建的。我已经通过了权限,但我找不到任何问题。
-
brew update 还可以更新在 /usr/local/Library/Taps/*/ 中找到的 git 存储库(我刚刚在 /usr/local/Library/Taps/homebrew-dupes/.git 中发生了这种情况) .检查那里的权限。我不确定 brew cleanup 是否可以清除它。