万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    brew updateが出来ない時 Mac

    brew update

    すると、

    error: unable to unlink old '.gitignore' (Permission denied)
    error: unable to create file .travis.yml (Permission denied)
    error: unable to unlink old '.yardopts' (Permission denied)
    error: unable to unlink old 'CONTRIBUTING.md' (Permission denied)
    error: unable to unlink old 'README.md' (Permission denied)
    error: unable to unlink old 'SUPPORTERS.md' (Permission denied)
    Warning: Could not create link for homebrew/dupes/fetchmail, as it
    conflicts with Homebrew/homebrew/fetchmail. You will need to use the
    fully-qualified name when referring this formula, e.g.
      brew install homebrew/dupes/fetchmail
    Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

    なんだこれは?

    適当に探したら以下の手順で書いけるできるらしい。

    cd /usr/local

    して

    git reset --hard origin/master

    してgitのリセットかけるが・・・

    error: unable to unlink old '.gitignore' (Permission denied)
    error: unable to create file .travis.yml (Permission denied)
    error: unable to unlink old '.yardopts' (Permission denied)
    error: unable to unlink old 'CONTRIBUTING.md' (Permission denied)
    error: unable to unlink old 'README.md' (Permission denied)
    error: unable to unlink old 'SUPPORTERS.md' (Permission denied)
    fatal: Could not reset index file to revision 'origin/master'.

    結局

    sudo chown -R $(whoami):admin /usr/local

    したらいけた。