Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

brew update fails on new Hombrew install on Lion #6913

Closed
lgw4 opened this issue Aug 9, 2011 · 6 comments
Closed

brew update fails on new Hombrew install on Lion #6913

lgw4 opened this issue Aug 9, 2011 · 6 comments

Comments

@lgw4
Copy link

lgw4 commented Aug 9, 2011

Fresh Lion install on MacBook Air Mid-2011. Xcode 4.1 installed. Fresh Hombrew install. brew update fails.


Initialized empty Git repository in /usr/local/.git/
remote: Counting objects: 40936, done.
remote: Compressing objects: 100% (18381/18381), done.
remote: Total 40936 (delta 24860), reused 36201 (delta 21963)
Receiving objects: 100% (40936/40936), 5.55 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (24860/24860), done.
From http://github.com/mxcl/homebrew
 * branch            HEAD       -> 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'.
rm: .git: Permission denied
Error: Failure while executing: rm -rf .git 
total 16
drwxr-xr-x  2 lgw4  wheel   68 Aug  9 15:44 .git/
-rw-r--r--  1 lgw4  wheel   97 Aug  9 15:41 .gitignore
drwxr-xr-x  2 lgw4  wheel   68 Aug  9 15:41 Cellar/
drwxr-xr-x  6 lgw4  wheel  204 Aug  9 15:41 Library/
-rw-r--r--  1 lgw4  wheel  679 Aug  9 15:41 README.md
drwxr-xr-x  3 lgw4  wheel  102 Aug  9 15:44 bin/
drwxr-xr-x  2 lgw4  wheel   68 Aug  9 15:41 etc/
drwxr-xr-x  2 lgw4  wheel   68 Aug  9 15:41 include/
drwxr-xr-x  2 lgw4  wheel   68 Aug  9 15:41 lib/
drwxr-xr-x  2 lgw4  wheel   68 Aug  9 15:41 sbin/
drwxr-xr-x  3 lgw4  wheel  102 Aug  9 15:41 share/
drwxr-xr-x  2 lgw4  wheel   68 Aug  9 15:41 var/

Output of brew doctor:


Your OS X is ripe for brewing.
Any troubles you may be experiencing are likely purely psychosomatic.

Output of brew --env:


CC: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/c++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -O3 -w -pipe
CXXFLAGS: -O3 -w -pipe
MAKEFLAGS: -j4
@lgw4
Copy link
Author

lgw4 commented Aug 9, 2011

It appears the problem is that the Homebrew install script is making /usr/local owned by root:wheel and the contents thereof owned by $USER:wheel. When I read the script (and my Ruby skills aren't that great, so maybe I'm mistaken), it should make /usr/local owned by root:staff and the contents owned by $USER:staff. Under Snow Leopard, /usr/local didn't exist on OS install, and I'm assuming this is still the case in Lion. I don't think any applications I've installed created /usr/local. Any ideas why I'm seeing this behavior?

@erikdahlstrand
Copy link

I can confirm this issue on OS X Lion.

@kenziii
Copy link

kenziii commented Aug 10, 2011

It's also happened on my new Mac mini with Xcode 4.1.1 installed

Initialized empty Git repository in /usr/local/.git/
remote: Counting objects: 40936, done.
remote: Compressing objects: 100% (18440/18440), done.
remote: Total 40936 (delta 24873), reused 36271 (delta 21904)
Receiving objects: 100% (40936/40936), 5.58 MiB | 219 KiB/s, done.
Resolving deltas: 100% (24873/24873), done.
From http://github.com/mxcl/homebrew
- branch            HEAD       -> 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'.
  rm: .git: Permission denied
  Error: Failure while executing: rm -rf .git

@imrefazekas
Copy link
Contributor

Having the same issue after the Xcode 4.1.1 installed.
Owning the /usr/local/.git is not resolving the issue ...

@jacknagel
Copy link
Contributor

See #6886

@mxcl
Copy link
Contributor

mxcl commented Aug 24, 2011

Dupe and fixed.

@mxcl mxcl closed this as completed Aug 24, 2011
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants