我剛剛購置了一臺新電腦,並在使用時間機器備份恢復計算機之前安裝了自制軟件。當我恢復它時,我更改了主用戶文件名。我認爲這是造成我的問題。自制軟件安裝計算機還原後的問題
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Counting objects: 230481, done.
remote: Compressing objects: 100% (60411/60411), done.
remote: Total 230481 (delta 168814), reused 230474 (delta 168810)
Receiving objects: 100% (230481/230481), 52.92 MiB | 744.00 KiB/s, done.
Resolving deltas: 100% (168814/168814), done.
From https://github.com/Homebrew/homebrew
* [new branch] master -> origin/master
error: unable to unlink old 'share/doc/homebrew/Acceptable-Formulae.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Bottles.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Brew-Test-Bot-For-Core-Contributors.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Brew-Test-Bot.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/C++-Standard-Libraries.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Common-Issues-for-Core-Contributors.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Common-Issues.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Custom-GCC-and-cross-compilers.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/External-Commands.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/FAQ.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Formula-Cookbook.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Gems,-Eggs-and-Perl-Modules.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Homebrew-0.8.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Homebrew-0.9.3.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Homebrew-0.9.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Homebrew-2.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Homebrew-and-Python.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/How-To-Open-a-Homebrew-Pull-Request-(and-get-it-merged).md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Installation.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Interesting-Taps-&-Branches.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Maintainer-Guidelines.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Press.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Python-for-Formula-Authors.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Querying-Brew.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/README.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/The-brew-command.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Tips-N'-Tricks.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Troubleshooting.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/Xcode.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-tap.md' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-failed-jenkins.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-failed-pr.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-failed-test.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-for-core-contributors-block.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-for-core-contributors-console.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-for-core-contributors-tabs.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-for-core-contributors-trigger.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-passed-jenkins.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-passed-pr.png' (Permission denied)
error: unable to unlink old 'share/doc/homebrew/brew-test-bot-triggered-pr.png' (Permission denied)
fatal: Could not reset index file to revision 'origin/master'.
Failed during: git reset --hard origin/master
這是它給我的錯誤。 我已經sudo卸載了舊的自制軟件,「rm -rf/usr/local/Cellar /usr/local/.git & & brew清理」,更改了文件權限,在文件夾中修改了文件「chown -R $ USER在/ usr /本地/」,感動了舊文件
cd /usr/local
# Moving old stuff out of the way.
sudo mv -v Library Library.old
# Now run Homebrew install script again.
在GitHub上的問題(https://github.com/Homebrew/homebrew/issues/15138)建議。這一切都沒有奏效!想法?
是OK刪除自制軟件和相關軟件包完全重新開始?如果是的話請試試這個腳本https://gist.github.com/mxcl/1173223 – Stickers 2015-02-11 19:19:27
謝謝!我嘗試過,但它給了一個錯誤 - 請參閱下文。我也試過這個卸載 - https://gist.github.com/SteveBenner/11254428,它給了「無法取消鏈接舊的'共享..''如上。'Alex-Taipales-MacBook:本地alextaipale $ git結帳掌握 錯誤: \t的.gitignore \t .yardopts \t CODEOFCONDUCT.md \t CONTRIBUTING.md \t LICENSE.TXT \t庫/ .rubocop.yml \t庫:以下未跟蹤工作樹中的文件會被檢出覆蓋/別名/ 0mq \t圖書館/別名/ 4store' – 2015-02-11 19:27:39
我發佈了一個答案b注意,使用它需要您自擔風險。好吧,如果你只是想開始它,這很好,給我發表評論如何去。 – Stickers 2015-02-11 19:50:40