So have macOS 10.13 and brew 0.9.9. Using brew installed a number of packages.
Zapara that the current version of brew does not support the current version of the os.
brew upgrade Warning: You are using OS X 10.13. We do not provide support for this pre-release version. You may encounter build failures or other breakages.
Updated brew doesn't want, maybe the first thing complains about the lack of rights to write to /usr/local
brew update Error: /usr/local must be writable!
chown doesn't work, because the directory is protected by System Integrity Protection, therefore it is necessary to disable change rights on the folder and try to update again.
However, I have doubts whether I think and does that road go for SIP disable is not desirable.
The only problem is the rights on the folder or then pulled another ribbon cable problems? If so, then perhaps there is a more simple solution which I don't know, for example, to reinstall brew. (I unfortunately don't know is deleted it along with installed packages or not, whether there are problems with access to the directory when reinstalling, etc.)
Share who has faced this problem and how to solve.