Como encontrar algo equivalente a R poppler no Debian?

0

Estou tentando reproduzir a proposta do segmento aqui , para obter a quantidade de páginas em um documento em PDF R, mas não consigo instalar o R poppler no Debian 8.5 como root

> install.packages("Rpoppler")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.wu.ac.at/src/contrib/Rpoppler_0.0-2.tar.gz'
Content type 'unknown' length 38208 bytes (37 KB)
==================================================
downloaded 37 KB

* installing *source* package ‘Rpoppler’ ...
** package ‘Rpoppler’ successfully unpacked and MD5 sums checked
checking for pkg-config... /usr/bin/pkg-config
checking whether pkg-config knows about poppler-glib >= 0.18.0... no
configure: error: cannot determine poppler-glib compile/link flags
ERROR: configuration failed for package ‘Rpoppler’
* removing ‘/usr/local/lib/R/site-library/Rpoppler’

The downloaded source packages are in
    ‘/tmp/RtmpwShV17/downloaded_packages’
Warning message:
In install.packages("Rpoppler") :
  installation of package ‘Rpoppler’ had non-zero exit status
> install.packages("Rpoppler::PDF_info")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning message:
package ‘Rpoppler::PDF_info’ is not available (for R version 3.3.2) 

R: 3.3.2
SO: Debian 8.5

    
por Léo Léopold Hertz 준영 18.12.2016 / 08:01

1 resposta

2

configure: error: cannot determine poppler-glib compile/link flags

Parece que as dependências não foram instalados:

SystemRequirements: Poppler Glib interface headers and libraries () 
                   [Debian/Ubuntu: libpoppler-glib-dev, Fedora: poppler-glib-devel]

Após a instalação via apt-get , o pacote Rpoppler deve ser compilado. Ah, e a dica de SO funciona bem:

> Rpoppler::PDF_info("/usr/share/doc/cvs/cvs.pdf")$Pages
[1] 194
    
por 18.12.2016 / 09:09