I tried to install a program and it alwaysed lacked permission on /usr/local. I tried sudo chown -R $USER /usr/local but then found out that doesn't work anymore with High Sierra. So I tried sudo chown -R $(whoami) $(brew --prefix)/* . That brought an awful lot of "Operation not permitted" in the terminal.
After that I wanted to install again with sudo. Then an error message showed sth like "sudoers uid is 501 should be 0" (cant exactly remember it)
Then I tried to restart the mac, but it never did... Just black screen. I heard the starting sound once or twice, but it never booted again or showed anything on the screen. Anyone any idea what happend and how to fix it?