cmake 错误:找不到 LibLZMA(缺少:LIBLZMA_INCLUDE_DIR

cmake 错误:找不到 LibLZMA(缺少:LIBLZMA_INCLUDE_DIR

我正在尝试安装这个软件称为acqu-root。这取决于主要软件。我设法安装了主要软件,但在获取 root 时遇到了问题。我收到以下错误。

[kabi@localhost build]$ cmake ..
-- *** Build Type:      Debug
-- *** Compiler Flags:  -g -O0 -Wall
-- *** Install libs to: /home/kabi/acqu-root/build/lib
-- *** Install bin to:  /home/kabi/acqu-root/build/bin
-- Looking for ROOT...
-- Looking for ROOT... - Found /home/kabi/root/bin/root
-- Looking for ROOT... - Found version is 6.03/01 
-- Configuring acqu_core...
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find LibLZMA (missing: LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY
  LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindLibLZMA.cmake:57 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  acqu_core/CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/kabi/acqu-root/build/CMakeFiles/CMakeOutput.log".

答案1

您需要lzma-devel使用yum(Fedora、RHEL、CentOS...)安装,或者liblzma-dev使用apt-getaptitude(Debian、Ubuntu...);它包含 CMake 配置正在寻找的 LibLZMA。

答案2

尝试

yum install xz-devel

在 Centos 上获取 liblzma 库(例如,对于 Silver-searcher。还可能需要 pcre-devellibpcre 依赖项)

相关内容