今天要做 Brew 的更新時,下了指令 brew update ,結果就跑出下面這些錯誤訊息

error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libcurl.pc' (Permission denied)
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libxml-2.0.pc' (Permission denied)
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/sqlite3.pc' (Permission denied)
Error: Failure while executing: git pull --ff --no-rebase --quiet origin refs/heads/master:refs/remotes/origin/master


Google 了一下解決方式,在Howebrew 的 GitHub 裡有人提同樣的問題,解法如下,請依序執行就可以..


$ sudo chown -R $USER:admin /usr/local
$ cd /usr/local
$ git reset --hard origin/master


參考網址
https://github.com/Homebrew/homebrew/issues/19140

arrow
arrow
    文章標籤
    brew update 更新錯誤
    全站熱搜

    wjhwang 發表在 痞客邦 留言(0) 人氣()