【學習筆記】linux編譯poppler


1.下載源碼

https://poppler.freedesktop.org/

2.命令行編譯命令

mkdir build
cd build
cmake ..
make
make install

如果提示有缺少的庫,sudo 安裝即可

-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.8.1") 
-- Checking for module 'fontconfig'
--   Found fontconfig, version 2.12.6
-- Found Fontconfig: /usr/lib/x86_64-linux-gnu/libfontconfig.so  
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.34") 
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Checking for module 'nss>=3.19'
--   No package 'nss' found
-- Could NOT find NSS3 (missing: NSS3_LIBRARIES NSS3_CFLAGS) 
CMake Error at CMakeLists.txt:143 (message):
  Install libjpeg before trying to build poppler.  You can also decide to use
  the internal unmaintained DCT decoder or none at all.


-- Configuring incomplete, errors occurred!
See also "/home/john/work/poppler-20.08.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/john/work/poppler-20.08.0/build/CMakeFiles/CMakeError.log".

缺少jpeg sudo apt-get install libjpeg-dev

再次 cmake

sudo apt-get install libopenjp2-7-dev

sudo apt-get install libboost-dev



免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM