If you’ve installed full Xcode from the Mac App Store but Homebrew still fails when building packages like telnet, the problem is usually that macOS is still pointing to the lightweight Command Line Tools instead of full Xcode.

Here’s how to fix it:

Step 1 β€” Tell macOS to use full Xcode

Open Terminal and run:

bash
sudo xcode-select -s /Applications/Xcode.app

This tells the system to use the complete Xcode installation instead of the Command Line Tools.


Step 2 β€” Try your Homebrew installation again

Now you can reinstall the package, for example:

bash
brew install telnet

It should now build and install without any xcodebuild errors.


Quick Tip:
To verify that macOS is pointing to the correct Xcode installation, you can run:

bash
xcode-select -p

It should return:

swift
/Applications/Xcode.app

That’s it! πŸš€