介绍:
Homebrew是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件,相当于linux下的apt-get、yum神器;此文针对安装Homebrew失败的解决办法。
问题:
当我在mac上高兴地安装了Homebrew,在Terminal运行:
brew install xxxxxx
终端爆出:
Error: You are using macOS 10.14.
We do not provide support for this pre-release version.You may encounter build failures or other breakages.Please create pull-requests instead of filing issues.
WTF??安装Homebrew时没有任何问题,使用命令却报错?
解决:
网上一大堆解决方案
1.sudo chown -R $(whoami) /usr/local
2.sudo chown -R $(whoami) $(brew --prefix)/*
too young!too simple!这是较老的os x版本的方法,尝试后都没用,快疯了。最后在stackoverflow(Link)终于 找到合适解决办法
Solution:
先卸载Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
再重新安装Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
okay!现在可以开始愉快地安装想要的包了......