qq_34350475 2017-06-22 09:04 采纳率: 80%
浏览 2720
已结题

如何安装编译pdf2htmlex实现pdf到html的格式转换功能

最近要实现一个pdf转HTML的功能,找来找去好像pdf2htmlEX最符合要求,但是Windows上不知道怎么安装,网上资料也很少,就试着在ubantu上搞搞,虽然这个我更不熟悉,完全陌生的操作系统,但是它教程比较多啊orz...

下载pdf2htmlEX后直接运行安装
错误信息:

-- Checking for module 'poppler>=0.25.0'

CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
CMakeLists.txt:22 (pkg_check_modules)

-- Configuring incomplete, errors occurred!
See also "/home/f03012/pdf2htmlEX/CMakeFiles/CMakeOutput.log".
经过查找资料发现下错了poppler包,

然后我就去重新下载poppler,并配置

./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-static \
--enable-build-type=release \
--enable-cmyk \
--enable-xpdf-headers \
--with-testdatadir=$PWD/testfiles &&
make

报错提示需要先安装libopenjpeg

checking for LIBOPENJPEG... no
checking for LIBOPENJPEG... no
checking for opj_cio_open in -lopenjpeg... no
checking openjpeg.h usability... no
checking openjpeg.h presence... no
checking for openjpeg.h... no
configure: error: Install libopenjpeg2 or libopenjpeg1 before trying to build poppler. You can also decide to use the internal unmaintained JPX decoder or none at all. See --help.

继续下载安装
CMake Warning (dev) at cmake/TestLargeFiles.cmake:20 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like "OPJ_HAVE_LARGEFILES" will no longer be dereferenced
when the policy is set to NEW. Since the policy is not set the OLD
behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:218 (OPJ_TEST_LARGE_FILES)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Z lib not found, activate BUILD_THIRDPARTY if you want build it (necessary to build libPNG)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- TIFF lib not found, activate BUILD_THIRDPARTY if you want build it
-- Could NOT find LCMS2 (missing: LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
-- Could NOT find LCMS (missing: LCMS_LIBRARY LCMS_INCLUDE_DIR)
-- LCMS2 or LCMS lib not found, activate BUILD_THIRDPARTY if you want build it
-- Configuring done
-- Generating done
-- Build files have been written to: /home/f03012/下载/openjpeg-2.1.0
[ 5%] Built target t1_generate_luts
[ 55%] Built target openjp2
[ 70%] Built target opj_compress
[ 85%] Built target opj_dump
[100%] Built target opj_decompress
[ 5%] Built target t1_generate_luts
[ 55%] Built target openjp2
[ 70%] Built target opj_compress
[ 85%] Built target opj_dump
[100%] Built target opj_decompress
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/lib/openjpeg-2.1/OpenJPEGTargets.cmake
-- Installing: /usr/local/lib/openjpeg-2.1/OpenJPEGTargets-noconfig.cmake
-- Up-to-date: /usr/local/lib/openjpeg-2.1/OpenJPEGConfig.cmake
-- Up-to-date: /usr/local/lib/pkgconfig/libopenjp2.pc
-- Up-to-date: /usr/local/include/openjpeg-2.1/opj_config.h
-- Up-to-date: /usr/local/lib/libopenjp2.so.2.1.0
-- Up-to-date: /usr/local/lib/libopenjp2.so.7
-- Up-to-date: /usr/local/lib/libopenjp2.so
-- Up-to-date: /usr/local/include/openjpeg-2.1/openjpeg.h
-- Up-to-date: /usr/local/include/openjpeg-2.1/opj_stdint.h
-- Up-to-date: /usr/local/bin/opj_decompress
-- Up-to-date: /usr/local/bin/opj_compress
-- Up-to-date: /usr/local/bin/opj_dump

看不出来是否安装成功...试着继续配置了一下poppler,错误信息改变了

configure: WARNING: libjpeg not found. disable JPEG support.
checking libjpeg.h works correctly... no
checking libjpeg.h problem can be fixed by XMD_H macro... no, disable libjpeg
configure: error: Install libjpeg before trying to build poppler. You can also decide to use the internal unmaintained DCT decoder or none at all. See --help.

这我就不知道该怎么办了,求帮助!!!

ps:软件源我换了阿里云的源,但是还是好多下不了,导致我都得去网上下载包下来解压安装,也不知道安装方式对不对,真的不懂这个系统,我的安装方式:解压压缩包,在文件目录执行cmake . && make && make install

或者有没有大神知道Windows下的安装方法的教教我!Windows下我下了源码,但是那个exe文件执行不了

  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2018-09-01 15:39
    关注
    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码