Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to install poppler 0.73.0 and pdftools in Debian 9?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
andresmorago
Posts: 1
Joined: 2021-10-26 01:36

How to install poppler 0.73.0 and pdftools in Debian 9?

#1 Post by andresmorago »

Hello to all.

I have been tirelessly trying to install a more recent version of poppler on my Debian (9.13 stretch) machine (i know this is very old). Even though im able to compile, for some reason installing pdftools ends with errors. I will appreciate any help given

Here is what i have done so far, according to [these ](https://askubuntu.com/a/1112947/1493271) instructions

Code: Select all

sudo apt purge libpoppler-cpp-dev
sudo apt-get install libopenjp2-7-dev libgdk-pixbuf2.0-dev cmake checkinstall
sudo apt-get build-dep libpoppler-cpp-dev
cd 
wget https://poppler.freedesktop.org/poppler-0.73.0.tar.xz
tar -xf poppler-0.73.0.tar.xz
cd poppler-0.73.0
mkdir build
cd build
cmake ..
sudo checkinstall make install
the above returns

Code: Select all

Done. The new package has been installed and saved to

 /home/admonda/poppler-0.73.0/build/poppler_0.73.0-1_amd64.deb

 You can remove it from your system anytime using: 

      dpkg -r poppler


then i execute

Code: Select all

echo "export R_LD_LIBRARY_PATH=\$R_LD_LIBRARY_PATH:/usr/local/lib" >> .bashrc
which returns nothing

then i go to my R console and run the pdftools package installation which fails

Code: Select all

> install.packages("pdftools")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
probando la URL 'https://cloud.r-project.org/src/contrib/pdftools_3.0.1.tar.gz'
Content type 'application/x-gzip' length 935692 bytes (913 KB)
==================================================
downloaded 913 KB

* installing *source* package ‘pdftools’ ...
** package ‘pdftools’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/local/include/poppler/cpp -I/usr/local/include/poppler
Using PKG_LIBS=-L/usr/local/lib -lpoppler-cpp
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include/poppler/cpp -I/usr/local/include/poppler -I"/usr/local/lib/R/site-library/Rcpp/include"  -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/stretch/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include/poppler/cpp -I/usr/local/include/poppler -I"/usr/local/lib/R/site-library/Rcpp/include"  -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/stretch/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c bindings.cpp -o bindings.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-z,relro -o pdftools.so RcppExports.o bindings.o -L/usr/local/lib -lpoppler-cpp -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/00LOCK-pdftools/00new/pdftools/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘pdftools’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/00LOCK-pdftools/00new/pdftools/libs/pdftools.so':
  libpoppler-cpp.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Ejecución interrumpida
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/pdftools’

The downloaded source packages are in
        ‘/tmp/RtmpAXvNGB/downloaded_packages’
Warning message:
In install.packages("pdftools") :
  installation of package ‘pdftools’ had non-zero exit status

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: How to install poppler 0.73.0 and pdftools in Debian 9?

#2 Post by arzgi »

Ubuntu is not Debian. Sometimes you can get some idea from Ubuntu forums, but I would not copy paste anything.

Code: Select all

$ cat /etc/debian_version 
11.1
~$ aptitude search pdftools
p   r-cran-pdftools                 - GNU R text extraction, rendering and conve
:~$ $ aptitude search poppler
p   gambas3-gb-poppler              - Gambas poppler component                  
i A gir1.2-poppler-0.18             - GObject introspection data for poppler-gli
p   libpoppler-cil                  - PDF rendering library -- CLI bindings     
p   libpoppler-cil-dev              - PDF rendering library -- CLI development f
p   libpoppler-cpp-dev              - PDF rendering library -- development files
i A libpoppler-cpp0v5               - PDF rendering library (CPP shared library)
p   libpoppler-dev                  - PDF rendering library -- development files
p   libpoppler-glib-dev             - PDF rendering library -- development files
p   libpoppler-glib-doc             - PDF rendering library -- documentation for
i A libpoppler-glib8                - PDF rendering library (GLib-based shared l
p   libpoppler-private-dev          - PDF rendering library -- private developme
p   libpoppler-qt5-1                - PDF rendering library (Qt 5 based shared l
p   libpoppler-qt5-dev              - PDF rendering library -- development files
i A libpoppler102                   - PDF rendering library                     
p   libpopplerkit-dev               - GNUstep framework for rendering PDF conten
p   libpopplerkit0                  - GNUstep framework for rendering PDF conten
p   monodoc-poppler-manual          - compiled XML documentation for Poppler Sha
i A poppler-data                    - encoding data for the poppler PDF renderin
i A poppler-utils                   - PDF utilities (based on Poppler)          
p   python3-poppler-qt5             - Python binding to Poppler-Qt5 C++ library 
p   qpdfview-pdf-poppler-plugin     - tabbed document viewer - DjVu plugin      
p   ruby-poppler                    - Ruby bindings for the libpoppler-glib libr
p   zathura-pdf-poppler             - PDF support for zathura       

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: How to install poppler 0.73.0 and pdftools in Debian 9?

#3 Post by stevepusser »

Well, let's see. MX 17/18 is based on Debian Stretch, and I try and build backports for it on as close to a generic Debian as possible.

https://repology.org/project/poppler/versions

Well, I remember having an older poppler backported for it, but I updated that to 20.09 in MX 19 for something that required it to build.

You can get 0.73.0 debianized source files by direct download from snapshot.debian.org.

Anyway, checkinstall is a very poor substitute for building packages the proper Debian way, which includes backporting them. Yes, they are in a deb file, but are installed in different directories, usually /usr/local. Plus Debian builds the poppler libs as versioned packages, which means you can have multiple versions installed at once. This means you won't have your whole system removed when you add a new libpoppler48 version and a system package still depends on something like libpoppler22.

https://wiki.debian.org/SimpleBackportCreation
MX Linux packager and developer

Post Reply