最近在搭建推流服务器的时候,碰到过一些问题,在安装nginx时执行这个命令
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上发现homebrew的成员有对这个问题的解答,需要去更新brew,使用这个命令
brew update
然后发现还是报错
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
因为英语不是很好,所以研究了会- -应该是权限不够.其实他这里已经给了提示,我们执行这个命令就可以了
sudo chown -R $(whoami) /usr/local
然后再去执行,
brew update
就解决了这个问题.
希望这个对同样碰到这个问题的同学有所帮助.
有不对的地方也请大家指出.谢谢.