ubuntuclangdoxygenlibclang

Doxygen: cannot find the shared library(s) 'libclang.so.6'


While running doxygen I get the following error:

doxygen: error while loading shared libraries: libclang.so.6: cannot open shared object file: No such file or directory

I have installed doxygen using sudo apt install doxygen on Ubuntu 17. In /usr/lib/x86_64-linux-gnu I have libclang-4.0.so.1 and libclang-5.0.so.1 but not libclang.so.6.

I have tried reinstalling doxygen and clang it doesn't help.

I also tried making a symbolic link called libclang.so.6 to the existing file libclang-5.0.so.1 as done here but it leads to this error:

doxygen: /usr/lib/x86_64-linux-gnu/libclang.so.6: version `LLVM_6.0' not found (required by doxygen)

How to resolve this error and get doxygen working?


Solution

  • The problem is solved by using this alternative method of installation. Follow these steps:

    1. Get copy of the repository

      git clone https://github.com/doxygen/doxygen.git
      cd doxygen
      
    2. Build

      mkdir build
      cd build
      cmake -G "Unix Makefiles" ..
      make
      
    3. Install

      sudo make install