请原谅我对Cmake的无知。我试图在Centos 7上安装Poppler0.86.1,但是我遇到了一个错误,上面写着CMake Error at CMakeLists.txt:208 (message): Install libopenjpeg2 before trying to build poppler. ,我通过运行以下命令安装了libopenjpeg2,包括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()
...谁能给我指出正确的方向,找出如何让Poppler0.86.1成功地安装在Centos 7上?
发布于 2020-08-20 16:58:04
如果我没记错的话,当我试图在我的码头形象中使用最新版本的Poppler时,我也遇到了同样的问题。我通过安装libopenjp2-7-dev修复了它。请检查my answer,特别是我的Dockerfile的第二行,在这里您可以看到我在运行cmake之前安装了什么。
发布于 2022-04-07 23:46:30
我撞到了它,这是由于https://github.com/uclouvain/openjpeg/issues/1174。为了解决这个问题,我修改了/lib64/openjpeg-2.3/OpenJPEGConfig.cmake的本地副本。
https://stackoverflow.com/questions/62942408
复制相似问题