4

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 with sudo apt-get install.

Zanna
  • 70,465

2 Answers2

6

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
Reini
  • 61
  • 2
  • 1
    Note that you may have to install sudo apt-get install clang-tools-5.0 on Ubuntu 16.04 before running sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-5.0 100 – Krishnaraj Feb 09 '18 at 06:48
1

This fixes the problem for me on Ubuntu 18.04:

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