如果我的 (zsh) shell 每次打开终端时都向我抛出这些 errors/warnings 是什么意思?

What does it mean if my (zsh) shell throws these errors/warnings at me every time I open the terminal?

这是我从 Mavericks 升级到 Yosemite 后每次启动 Terminal.app 时看到的内容:

dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
  Referenced from: /usr/local/bin/zsh
  Reason: image not found
zsh: trace trap
/Users/user/sandbox/repos/zsh-notify/notify.plugin.zsh:55: command not found: add-zsh-hook
/Users/user/sandbox/repos/zsh-notify/notify.plugin.zsh:56: command not found: add-zsh-hook

为了查看权限是否可能混乱,我检查了

➜  exp-scotty  where zsh
/usr/local/bin/zsh
/usr/local/bin/zsh
/bin/zsh
/bin/zsh
➜  exp-scotty  ll `where zsh`
-rwxr-xr-x  1 root   wheel   538K Sep 10 01:19 /bin/zsh
-rwxr-xr-x  1 root   wheel   538K Sep 10 01:19 /bin/zsh
lrwxr-xr-x  1 milan  admin    27B Oct 28 10:59 /usr/local/bin/zsh -> ../Cellar/zsh/5.0.7/bin/zsh
lrwxr-xr-x  1 milan  admin    27B Oct 28 10:59 /usr/local/bin/zsh -> ../Cellar/zsh/5.0.7/bin/zsh

版本:

➜  exp-scotty  sw_vers
ProductName:    Mac OS X
ProductVersion: 10.10.1
BuildVersion:   14B25

➜  exp-scotty  /bin/zsh --version
zsh 5.0.5 (x86_64-apple-darwin14.0)

➜  exp-scotty  /usr/local/bin/zsh --version
dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
  Referenced from: /usr/local/bin/zsh
  Reason: image not found
[1]    81495 trace trap  /usr/local/bin/zsh --version

可能出了什么问题? And/or我该如何解决?

这意味着您正在尝试使用 add-zsh-hook 而不加载它。您的 shell 配置丢失 autoload -U add-zsh-hook。除此之外,假设您使用的是 brew,您还缺少 libpcre,您可能需要重新安装并重新链接它。