如何在 Debian 中找到与 R poppler 等效的东西?

如何在 Debian 中找到与 R poppler 等效的东西?

我正在尝试重现该线程的提案这里,通过 R 获取 pdf 文档中的页数,但我无法以 root 身份在 Debian 8.5 中安装 R poppler

> 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
操作系统:Debian 8.5

答案1

配置:错误:无法确定 poppler-glib 编译/链接标志

它看起来像依赖关系尚未安装:

系统要求:Poppler Glib 接口头文件和库 ()
                   [Debian/Ubuntu: libpoppler-glib-dev, Fedora: poppler-glib-devel]

通过 安装后apt-get,该Rpoppler包应该可以编译。哦,还有来自的提示所以工作得很好:

> Rpoppler::PDF_info("/usr/share/doc/cvs/cvs.pdf")$页数
[1]194

相关内容