Gangmax Blog

zsh: the "no such file or directory" error

Today I find when I execute the “.zshrc” script manually, the following error happens:

1
zsh problem: compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask

I get the solution from here.

This is caused by “Homebrew” and can be fixed by running the following commends(which cleans up the useless files):

1
2
3
brew doctor
brew cleanup
source ~/.zshrc

Comments