安装 OhMyZsh 方法 以及报错处理

安装方式有两种 curl 或 wget 

curl 方式:    
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 

wget 方式:
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 


安装报错

Cloning Oh My Zsh...
xcrun: error: active developer path ("/Users/guokai/Desktop/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Error: git clone of oh-my-zsh repo failed

先输入下面命令在运行安装zsh指令

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

安装成功界面 

安装 OhMyZsh 方法 以及报错处理_第1张图片

安装好之后,需要把 Zsh 设置为当前用户的默认 Shell(这样新建标签的时候才会使用 Zsh):

$ chsh -s /bin/zsh

更改主题 

编辑vim ~/.zshrc文件,将主题配置ZSH_THEME="robbyrussell" 修改为ZSH_THEME="agnoster"

 

 

你可能感兴趣的:(mac,OS)