Active Directoryいれたらsudo権限が変更されてbrewコマンドが使えない問題の解決
経緯
会社PCでActive Directoryを入れられた影響でsudo権限がおかしなことになり。もろもろ影響が出ている。
特にHomebrewでbrew install
とかbrew upate
ができない。
あれ、ちょっと前まで使えた気がしたが... :p
hubコマンド使いたくて $ brew install hub
したらerrorがでて萎えた。
sudoたたくとでる↓
error文
$ sudo brew install
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
対処
1. スーパユーザーにパスワードを指定
そういえばスーパユーザーのパスを設定していなかった。
$ sudo passwd root
Password:
Changing password for root.
New password:
Retype new password:
2. 自分に権限の指定
/usr/local の権限がrootに変わっていたっぽいので、
homebrewを一般ユーザで実行できなくなっていた…
$ ls -la /usr/local/bin/brew
$ sudo chown root /usr/local/bin/brew
通ったっぽい。
3. 満を持してぶりゅー
$ sudo brew install hub
==> Downloading https://homebrew.bintray.com/bottles/hub-2.2.1.mavericks.bottle.
######################################################################## 100.0%
==> Pouring hub-2.2.1.mavericks.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completion has been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/hub/2.2.1: 9 files, 9.6M
めでたしめでたし。🍺 見るとテンション上がる。
まとめ
Active Directoryのクソ野郎。
Author And Source
この問題について(Active Directoryいれたらsudo権限が変更されてbrewコマンドが使えない問題の解決), 我々は、より多くの情報をここで見つけました https://qiita.com/norinity1103/items/f13a35bce6f05d65c99b著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .