Homebrew messed up 자식 제거 to include in what will be

https://superuser.com/a/203740을 사용하여 Homebrew를 제거했습니다 .

위의 명령을 실행 한 후 .bashrc및을 찾을 수 없습니다 .bash_profle. 모든 파일에서 사라 Documents, Desktop그리고 Downloads: ‘(

내가 자식 상태를 수행하면 다음과 /Users/ava같이 표시됩니다.

# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)

... all the files which are in /Users/ava

역사

 113  cd `brew --prefix`
  114  rm -rf Cellar
  115  brew prune
  116  rm `git ls-files`
  117  rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
  118  rm -rf .git
  119  rm -rf ~/Library/Caches/Homebrew
  120  sudo chown -R $USER:admin /usr/local
  121  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  122  brew doctor

무슨 일이야?



답변

git이 / Users / ava 아래의 모든 파일을 추적했다면

rm `git ls-files`

명령은 그것들을 모두 삭제했을 것입니다 ( git status출력이 당신에게 말하는 것입니다.

당신이 말하는 파일이 그 목록에 없다면 그 rm 명령 중 어떤 것이 문제를 일으켰는지 확실하지 않습니다.


답변

이 줄은 비린내가 보인다 : sudo chown -R $USER:admin /usr/local

관리자입니까? groups찾아 실행하십시오 . 원래 /usr/local소유권 설정이 무엇인지 모르지만 여기에 내 것이 있습니다 (그리고 정기적으로 git and brew를 사용합니다).

lovelace% ls -dl /usr/local
drwxrwxr-x  18 root  admin  612 Aug  5 15:30 /usr/local

root:admin의 소유자 인 것 같습니다 /usr/local. 시험:

sudo chown -R root:admin /usr/local