装完nvm后打开iTerm2后出现以下提示:

1
2
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

出现这个原因就是提示又不安全的目录,是否忽略。

解决办法:

执行compaudit,列出不安全目录,我这里列出的目录为:

1
2
/usr/local/share/zsh/site-functions
/usr/local/share/zsh

然后赋予目录权限即可

1
2
3
4
5
cd /usr/local/share/zsh
sudo chmod -R 755 ./site-functions

cd ../
sudo chmod -R 755 zsh