LLVM Discussion Forums

Can't run clangd on macOS Catalina

Hi, there! There is a noob question here:
I’ve already installed llvm with brew install llvm , but when I open VS Code, I got this error prompt:

Couldn't start client Clang Language Server

And the output shows this:

[Error - 11:25:27 AM] Starting client failed
Launching server using command clangd failed.

So I ran clangd --version to check my installation, but unfortunately, I got command not found error.
And I tried to reinstall llvm, but that can’t solve my problem.
I need someone to help.

I recommend to check this:

Oh, thank you a lot.
I added llvm path to $PATH and it works properly.
So won’t Homebrew add it to path automatically?

It’s strange. isn’t? :neutral_face:

Obviously, there is something wrong with Homebrew or something in the LLVM package.
I think there is no any issue with Homebrew because I used to install Speedtest CLI with Homebrew and I can run it immediately after installation use speedtest command.

I don’t know the policy of packaging LLVM by homebrew. But Clang versions are very different to each other. I think Homebrew Installs this package in different places to be able to install many versions beside each other…

Maybe you got the point.
But however, I think add a program to $PATH after installation is a important thing.