Trying to install Atom. Unable to start Clangd language server

I am fairly new to Ubuntu. I am trying to set up Atom to write code with C++ and I get this:

Tried to spawn process using executable /usr/bin/clangd, which does not exist.
Ensure you have correctly configured the path to Clangd in the package settings.

and

This can occur if you do not have Clangd installed or if it is not in your path.

Can somebody explain to me in detail what should I do? I have clang and llvm installed by the terminal withsudo apt-get install.

1

2 Answers

This fixes the problem for me on Ubuntu 17.10:

sudo apt purge clang
sudo apt autoremove
sudo apt install clang-5.0
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-5.0 100
1

This fixes the problem for me on Ubuntu 18.04:

sudo mv /usr/bin/clang /usr/bin/clangd

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like