brew install watchman error!!!

报错

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/lzma
/usr/local/include is not writable.
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/lib
Error: Permission denied @ dir_s_mkdir - /usr/local/lib

总结来说就是文件权限问题
so 根据提示mkdir文件夹并开放权限

sudo chown -R whoami /usr/local

sudo mkdir /usr/local/lib

sudo chown $(whoami):admin /usr/local/lib

over

then

brew link --overwrite watchman

看一下是否已经link到watchman
没有的话你就会看到一个ERROR

Error: No such keg: /usr/local/Cellar/watchman

接着执行安装

brew install watchman

成功后再执行brew link --overwrite watchman你就会看到

Warning: Already linked: /usr/local/Cellar/watchman/4.9.0_2
To relink: brew unlink watchman && brew link watchman

成功啦,还顺便告诉你要unlink的话就:brew unlink watchman

你可能感兴趣的:(brew install watchman error!!!)