Macbook Air Lion で brew update Aborting とか言われてめげる
Snow Leopard から Lion に移行アシスタントで楽をしようと思ったのが間違いだったのか、と疑った私が悪かった。反省。
Xcode4.1
perlbrew
cpanm
homebrew
nvm
node+npm
nvm use v0.4.9
npm update
までは、順調。
以下で、躓く。
[zunermuka ~]$ brew update
error: The following untracked working tree files would be overwritten by checkout:
.gitignore
...
Aborting
Error: Failure while executing: git checkout -q master
[zunermuka /usr/local]$ cd `brew --prefix`
[zunermuka /usr/local]$ git init
Reinitialized existing Git repository in /usr/local/.git/
[zunermuka /usr/local]$ git remote add -f -t master -m master origin git://github.com/mxcl/homebrew.git
fatal: remote origin already exists.
[zunermuka /usr/local]$ git reset --hard origin/HEAD
error: unable to unlink old '.gitignore' (Permission denied)
error: unable to unlink old 'README.md' (Permission denied)
fatal: Could not reset index file to revision 'origin/HEAD'.
[zunermuka /usr/local]$ git reset --hard FETCH_HEAD
error: unable to unlink old '.gitignore' (Permission denied)
error: unable to unlink old 'README.md' (Permission denied)
fatal: Could not reset index file to revision 'FETCH_HEAD'.
error: unable to unlink old '.gitignore' (Permission denied)
error: unable to unlink old 'README.md' (Permission denied)
が消えないぞ。
結局、以下の流れの最後の部分で解決。
https://github.com/mxcl/homebrew/issues/5128
[zunermuka /usr/local]$ git fetch git://github.com/mxcl/homebrew.git
From git://github.com/mxcl/homebrew
* branch HEAD -> FETCH_HEAD
[zunermuka /usr/local]$ git reset FETCH_HEAD
[zunermuka /usr/local]$ brew update
From http://github.com/mxcl/homebrew
* branch master -> FETCH_HEAD
Already up-to-date.
Xcode4.1
perlbrew
cpanm
homebrew
nvm
node+npm
nvm use v0.4.9
npm update
までは、順調。
以下で、躓く。
[zunermuka ~]$ brew update
error: The following untracked working tree files would be overwritten by checkout:
.gitignore
...
Aborting
Error: Failure while executing: git checkout -q master
[zunermuka /usr/local]$ cd `brew --prefix`
[zunermuka /usr/local]$ git init
Reinitialized existing Git repository in /usr/local/.git/
[zunermuka /usr/local]$ git remote add -f -t master -m master origin git://github.com/mxcl/homebrew.git
fatal: remote origin already exists.
[zunermuka /usr/local]$ git reset --hard origin/HEAD
error: unable to unlink old '.gitignore' (Permission denied)
error: unable to unlink old 'README.md' (Permission denied)
fatal: Could not reset index file to revision 'origin/HEAD'.
[zunermuka /usr/local]$ git reset --hard FETCH_HEAD
error: unable to unlink old '.gitignore' (Permission denied)
error: unable to unlink old 'README.md' (Permission denied)
fatal: Could not reset index file to revision 'FETCH_HEAD'.
error: unable to unlink old '.gitignore' (Permission denied)
error: unable to unlink old 'README.md' (Permission denied)
が消えないぞ。
結局、以下の流れの最後の部分で解決。
https://github.com/mxcl/homebrew/issues/5128
[zunermuka /usr/local]$ git fetch git://github.com/mxcl/homebrew.git
From git://github.com/mxcl/homebrew
* branch HEAD -> FETCH_HEAD
[zunermuka /usr/local]$ git reset FETCH_HEAD
[zunermuka /usr/local]$ brew update
From http://github.com/mxcl/homebrew
* branch master -> FETCH_HEAD
Already up-to-date.
コメント