If you encounter the “Your CLT does not support macOS 11” error while using Homebrew to install a package on macOS, such as rbenv, here’s how you can resolve it.

First, let’s take a look at the error message:

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.apple.com/download/more/~.

Error: An exception occurred within a child process:
 SystemExit: exit

To fix this issue, follow these steps:

  1. Run the following command as suggested in the error message:

    softwareupdate --all --install --force
    

    If this doesn’t show you an update, proceed to the next step.

  2. Remove the existing Command Line Tools (CLT) by running the following commands in the terminal:

    sudo rm -rf /Library/Developer/CommandLineTools
    sudo xcode-select --install
    
  3. After removing the CLT, you can now try installing the package with Homebrew again. For example:

    brew install rbenv
    

By following these steps, you should be able to fix the “Your CLT does not support macOS 11” error on macOS.