Fix Xcode Command Line Tools not working while installed

Sometimes Command Line Tools stop working, and I have a hard time fixing them.

Today, I reinstalled them twice, but they kept not working.

I found a topic on Stack Overflow talking about this problem, and I tried a solution that solved the issue:

bash
# It seems that Command Line Tools are located at /Library/Developer/CommandLineTools.
# We can tell Xcode to find Command Line Tools there.
sudo xcode-select --select /Library/Developer/CommandLineTools

Join my mailing list

Get monthly insights, personal stories, and in-depth information about what I find helpful in web development as a freelancer.

Email advice once a month + Free XState report + Free course on XState

Want to see what it looks like? View the previous issues.

I value your privacy and will never share your email address.