我正在使用苹果 M1 MacBook pro。
当我安装 oh my zsh 时。当我将 export PATH="/opt/homebrew/bin:$PATH"
添加到 ~/. zhrc 文件时。这个错误显示在我的终端中:
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
但是,我检查并发现这两个文件确实存在。 有人能告诉我问题出在哪里吗?
这是我的 ~/. zhrc 文件:
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="/usr/local/man:$MANPATH"
[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="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"
#Homebrew END
#Wget
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
#Wget END
#Path to your oh-my-zsh installation.
export ZSH="/Users/caizhuoyue/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", 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="random"
"~/.zshrc" 114L, 3999C