Solution 1:

I'd try running the uninstaller and then try installing it again.

To uninstall use:

/bin/bash -c "$[github.com/homebrew/install#uninstall-homebrew](curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Or download the uninstall script and run:

/bin/bash uninstall.sh --help

... to view more uninstall options.

The uninstall command is from: (https://github.com/homebrew/install#uninstall-homebrew)