最近在搭建推流服務器的時候,碰到過一些問題,在安裝nginx時執(zhí)行這個命令
brew tap homebrew/nginx
報錯為
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-nginx/Formula/naxsi-nginx-module.rbundefined method `version_scheme' for #Error: Cannot tap homebrew/nginx: invalid syntax in tap!
最后在github上發(fā)現(xiàn)homebrew的成員有對這個問題的解答,需要去更新brew,使用這個命令
brew update
然后發(fā)現(xiàn)還是報錯
Error: /usr/local is not writable. You should change the ownership
and permissions of /usr/local back to your user account:
sudo chown -R $(whoami) /usr/local
因為英語不是很好,所以研究了會- -應該是權(quán)限不夠.其實他這里已經(jīng)給了提示,我們執(zhí)行這個命令就可以了
sudo chown -R $(whoami) /usr/local
然后再去執(zhí)行,
brew update
就解決了這個問題.
希望這個對同樣碰到這個問題的同學有所幫助.
有不對的地方也請大家指出.謝謝.