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?
The problem is solved by using this alternative method of installation. Follow these steps:
Get copy of the repository
git clone https://github.com/doxygen/doxygen.git
cd doxygen
Build
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make
Install
sudo make install
On Ubuntu 20.04, I successfully installed the binary distribution from https://www.doxygen.nl/download.html#srcbin (doxygen-1.9.1.linux.bin.tar.gz
which is "compiled using Ubuntu 20.04 and dynamically linked against libclang version 9"). Then by using apt-file
program, I was able to find and install each missing library as follows:
$ doxygen --version
doxygen: error while loading shared libraries: libclang-9.so.1: cannot open shared object file: No such file or directory
$ apt-file search libclang-9.so.1
libclang1-9: /usr/lib/llvm-9/lib/libclang-9.so.1
libclang1-9: /usr/lib/x86_64-linux-gnu/libclang-9.so.1
$ sudo apt install libclang1-9
(...)
$ doxygen --version
doxygen: error while loading shared libraries: libclang-cpp.so.9: cannot open shared object file: No such file or directory
$ apt-file search libclang-cpp.so.9
libclang-cpp9: /usr/lib/llvm-9/lib/libclang-cpp.so.9
libclang-cpp9: /usr/lib/x86_64-linux-gnu/libclang-cpp.so.9
$ sudo apt install libclang-cpp9
(...)
$ doxygen --version
1.9.1 (ef9b20ac7f8a8621fcfc299f8bd0b80422390f4b)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With