请原谅我对 Cmake 的无知。我正在尝试在 Centos 7 上安装 Poppler 0.86.1,但我遇到了一个错误,提示CMake Error at CMakeLists.txt:208 (message): Install libopenjpeg2 before trying to build poppler.
我已通过运行以下命令安装了包含 dev 包的 libopenjpeg2:
sudo yum install openjpeg2-devel
我正在采取以下步骤来安装 poppler:
wget https://poppler.freedesktop.org/poppler-0.86.1.tar.xz
tar xf poppler-0.86.1.tar.xz
cd poppler-0.86.1/
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
导致以下错误
CMake Error at CMakeLists.txt:208 (message):
Install libopenjpeg2 before trying to build poppler. You can also decide
to use the internal unmaintained JPX decoder or none at all.
-- Configuring incomplete, errors occurred!
这是 CMakeLists.txt 中发生故障的地方
if(ENABLE_LIBOPENJPEG STREQUAL "openjpeg2")
find_package(OpenJPEG)
set(WITH_OPENJPEG ${OpenJPEG_FOUND})
if(NOT OpenJPEG_FOUND OR OPENJPEG_MAJOR_VERSION VERSION_LESS 2)
message(FATAL_ERROR "Install libopenjpeg2 before trying to build poppler. You can also decide to use the internal unmaintained JPX decoder or none at all.")
endif()
...
谁能指出我正确的方向来弄清楚如何让 Poppler 0.86.1 成功安装在 Centos 7 上?