Debian

如何在 Debian 中找到與 R poppler 等價的東西?

  • December 18, 2016

我試圖在這裡重現該執行緒的建議,以獲取 R 在 pdf 文件中的頁面數量,但我無法在 Debian 8.5 中以 root 身份安裝 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

配置:錯誤:無法確定 poppler-glib 編譯/連結標誌

看起來依賴項尚未安裝:

SystemRequirements:Poppler Glib 介面標頭檔和庫()
[Debian/Ubuntu:libpoppler-glib-dev,Fedora:poppler-glib-devel]

通過安裝後apt-getRpoppler包應該編譯。哦,來自SO的提示效果很好:

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

引用自:https://unix.stackexchange.com/questions/331175