我目前正在尝试在我的计算机上安装 doxygen,但是通过命令行运行 doxygen 时失败并出现以下错误:
doxygen: error while loading shared libraries: libclang.so.6: cannot open shared object file: No such file or directory
我尝试了多种安装方法。我尝试使用 apt-get,尝试从源代码构建,尝试了此 StackExchange 答案。当我尝试从源代码构建它时,cmake 失败并出现以下错误:
~/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!
我甚至尝试过手动安装 clang,但都无济于事。
答案1
升级到 Ubuntu 18.04 后,使用 apt 安装 flex 和 bison,然后使用源代码重建这些说明,我终于可以让 doxygen 工作了。