如何修復 macOS 中的「您的 CLT 不支援 macOS 11」錯誤

最近在 macOS 上使用 Homebrew 安裝套件時,我遇到了這個錯誤,我的情況是安裝 rbenv 時出現了以下錯誤訊息: ➜ brew install rbenv ... Error: Your CLT does not support macOS 11. It is either outdated or was modified. Please update your CLT or delete it if no updates are available. Update them from Software Update in System Preferences or run: softwareupdate --all --install --force If that doesn't show you an update run: sudo rm -rf /Library/Developer/CommandLineTools sudo xcode-select --install Alternatively, manually download them from: https://developer....