0

I am currently trying to install doxygen on my computer, but upon running doxygen through the command line it fails with this error:

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

I have tried multiple ways of installing it. I tried using apt-get, I tried building it from source, and I tried the unique solution suggested in this StackExchange answer. When I try to build it from source, cmake fails with this error:

 ~/Documents/Repos/doxygen/build/CMakeFiles$ cmake -G "Unix Makefiles" ..
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find FLEX (missing: FLEX_EXECUTABLE)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindFLEX.cmake:230 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:84 (find_package)


-- Configuring incomplete, errors occurred!

I have even tried installing clang manually, but all to no avail.

  • When running doxygen you get the message about libclang.so.6 and you also say that you used the suggestion in stackoverflow.com/questions/49220422/… installin clang-6.0. What happens if you give the command ldd <path_to_doxygen_executable>/doxygen in respect to clang? Is the directory where clang 6.0 is installed in your LD_LIBRARY_PATH? – albert May 8 '18 at 13:54
  • 1
    Regarding the building from sources, it looks like flex is not installed or it is installed in a place cmake cannot find it. – albert May 8 '18 at 14:03
  • doxygen should install using apt and run fine on 16.04, pulling in libclang1-3.6 and libllvm3.6v5 as dependencies if necessary. If you followed the linked instructions literally (which are for 17.10) then possibly you have messed up the versions of clang/llvm on your system? – steeldriver May 8 '18 at 14:12
  • Libclang is version 3.6 and libllvm is 3.6v5. I tried installing flex using apt-get and the build still fails with the same error. – Ian MathWiz May 9 '18 at 3:21
  • Upon running ldd it says libclang.so.6 => not found even after I tried reinstalling libclang 6 and doxygen using apt-get. – Ian MathWiz May 9 '18 at 7:04
0

After upgrading to Ubuntu 18.04, installing flex and bison with apt, and rebuilding from source using these instructions, I was finally able to get doxygen to work.

  • Good to see that you succeeded although you needed to install a new version of the OS and did the build yourself instead of using a provided Ubuntu package (but this would probably not be the newest version, but the 1.8.13 version). – albert May 10 '18 at 14:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.