brew 安装 Xcode 管理工具 xcodes 时报错

brew 安装 xcodes 时报错:Error: Permission denied @ dir_s_mkdir - /usr/local/Caskroom/xcodes

解决:

sudo chown -R $(whoami):staff ~/Library/Caches/Homebrew /usr/local/Caskroom/