title: zsh problem: compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew
body: <p>I am using apple M1 MacBook pro.</p>
  <p>When I installed oh my zsh. When I added<code>export PATH=&quot;/opt/homebrew/bin:$PATH&quot;</code> to my ~/.zshrc file. This error was shown in my terminal:</p>
  <pre><code>joe :: share/zsh/site-functions » source ~/.zshrc
  compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew
  compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
  </code></pre>
  <p>However, I checked and found that these two files do exsist.
  Can someone tell me that the problem is?</p>
  <p>This is my ~/.zshrc file:</p>
  <pre><code>Last login: Sat Jan 16 14:53:34 on console
  compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew
  compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
  [oh-my-zsh] Random theme 'jnrowe' loaded
  Ξ ~ → cd ~
  Ξ ~ → source .zshrc
  
  compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew
  compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
  # export MANPATH=&quot;/usr/local/man:$MANPATH&quot;
  [oh-my-zsh] Random theme 'cypher' loaded
  joe :: ~ » chmod 755 /usr/local/share/zsh
  chmod 755 /usr/local/share/zsh/site-functions
  
  joe :: ~ » sudo chmod 755 /usr/local/share/zsh
  Password:
  joe :: ~ » sudo chmod 755 /usr/local/share/zsh/site-functions
  joe :: ~ » ls
  #ZSH_DISABLE_COMPFIX=true
  
  # If you come from bash you might have to change your $PATH.
  # export PATH=$HOME/bin:/usr/local/bin:$PATH
  
  #Homebrew
  export PATH=&quot;/opt/homebrew/bin:$PATH&quot;
  export PATH=&quot;/opt/homebrew/sbin:$PATH&quot;
  #Homebrew END
  
  #Wget
  export LDFLAGS=&quot;-L/opt/homebrew/opt/openssl@1.1/lib&quot;
  export CPPFLAGS=&quot;-I/opt/homebrew/opt/openssl@1.1/include&quot;
  #Wget END
  
   #Path to your oh-my-zsh installation.
  export ZSH=&quot;/Users/caizhuoyue/.oh-my-zsh&quot;
  
  # Set name of the theme to load --- if set to &quot;random&quot;, it will
  # load a random theme each time oh-my-zsh is loaded, in which case,
  # to know which specific one was loaded, run: echo $RANDOM_THEME
  # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
  ZSH_THEME=&quot;random&quot;
  
  &quot;~/.zshrc&quot; 114L, 3999C
  
  
  
  
  </code></pre>