Ubuntu – Installing poppler-0.62.0 on ubuntu 16.04

16.04poppler

Not able to build the poppler 0.62.0, getting following error

Source Code: https://poppler.freedesktop.org/poppler-0.62.0.tar.xz

 -- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found
 -- Checking for module 'gobject-introspection-1.0'
 --   No package 'gobject-introspection-1.0' found
 -- Checking for modules 'gtk+-3.0>=3.8;gdk-pixbuf-2.0'
 --
 -- Could NOT find GTK (missing:  GTK3_LIBRARIES GTK3_CFLAGS)
 -- Checking for module 'libopenjp2'
 --   No package 'libopenjp2' found CMake Error at CMakeLists.txt:199 (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! See also "/home/ubuntu/imagemagick_build/poppler-0.62.0/build/CMakeFiles/CMakeOutput.log".
 See also
 "/home/ubuntu/imagemagick_build/poppler-0.62.0/build/CMakeFiles/CMakeError.log".

I have installed libopenjp2-tools as well, still its giving error

Best Answer

For installation of Poppler on 16.04 LTS do the following:

  1. Enable source packages from Software & Updates.
  2. Install build dependencies with sudo apt-get build-dep libpoppler58
  3. Install cmake with sudo apt-get install cmake
  4. Install development package for libopenjp2 with sudo apt-get install libopenjp2-7-dev
  5. Install Gdk-PixBuf with sudo apt-get install libgdk-pixbuf2.0-dev
  6. Install checkinstall to make deb-package sudo apt-get install checkinstall
  7. Download and run the compilation:

    cd /tmp
    wget https://poppler.freedesktop.org/poppler-0.62.0.tar.xz
    tar -xf poppler-0.62.0.tar.xz
    cd poppler-0.62.0
    
    mkdir build
    cd build
    cmake ..
    sudo checkinstall make install
    

In checkinstall session do the following:

  1. for Should I create a default set of package docs? answer n.
  2. enter libpoppler-0.62.0 as package description and press Ctrl+D;
  3. enter 2 and enter libpoppler as package Name, press Enter;
  4. enter 3 and enter 0.62.0-local as package Version, press Enter;
  5. press Enter to continue (start compilation and deb-package building)

You can verify installation of your package with apt-cache policy libpoppler:

libpoppler:
  Installed: 0.62.0-local-1
  Candidate: 0.62.0-local-1
  Version table:
 *** 0.62.0-local-1 100
        100 /var/lib/dpkg/status

Binaries will be install into /usr/local/bin (you can check this with dpkg -L libpoppler).