0

Error installing package pdftools in R server

This is directly related to this one.

The first half of the error message I get when I try to install pdftools as is such

   rm -f RcppExports.o bindings.o pdftools.dll
   "C:/Users/someone/AppData/Local/Programs/R/R-42~1.1/bin/x64/Rscript.exe" 
   "../tools/winlibs.R" 22.04.0
   Error in download.file(sprintf("https://github.com/rwinlib/poppler/archive/v%s.zip",  : 
    cannot open URL 'https://github.com/rwinlib/poppler/archive/v22.04.0.zip'
   In addition: Warning message:
   In download.file(sprintf("https://github.com/rwinlib/poppler/archive/v%s.zip",  :
   URL 'https://codeload.github.com/rwinlib/poppler/zip/refs/tags/v22.04.0': status was 'SSL 
   connect error'
   Execution halted

Not sure what to do, I decided to put the second link listed into the browser, https://codeload.github.com/rwinlib/poppler/zip/refs/tags/v22.04.0. As a result, a zip file titled, "poppler-22.04.0" was downloaded. What do I do with this?

Tim Wilcox
  • 1,275
  • 2
  • 19
  • 43
  • 2
    I am assuming you are trying to install on Windows? Looks like `install.packages` is trying to download the `poppler` dependency but failing due to an SSL certificate issue. You may want to try: `set_config( config( ssl_verifypeer = 0L ) ); devtools::install_github('ropensci/pdftools')` ? – br00t Oct 24 '22 at 19:39
  • 1
    @br00t, Yes trying to install this on Windows. So I put that code that you provided in the console? – Tim Wilcox Oct 24 '22 at 19:45
  • 1
    Yes @Tim Wilcox, *if* it complains about the first line you can also try: `set_config( config( ssl.verifypeer = 0L ) ); devtools::install_github('ropensci/pdftools')` – br00t Oct 24 '22 at 19:47
  • 1
    `httr::set_config( httr::config( ssl_verifypeer = 0L ) ); install.packages('pdftools')` or just `devtools::install_github('ropensci/pdftools')` – br00t Oct 24 '22 at 20:02
  • @br00t. If I go to this URL directly, it downloads something. Error in utils::download.file(url, path, method = method, quiet = quiet, : cannot open URL 'https://api.github.com/repos/ropensci/pdftools/tarball/HEAD' – Tim Wilcox Oct 24 '22 at 20:04
  • 1
    Just out of curiosity, @Tim Wilcox, are you behind some kind of proxy server? This can sometimes cause issues with package installation. Are you able install any other packages? Please try these two methods: 1. `httr::set_config( httr::config( ssl_verifypeer = 0L ) ); install.packages('pdftools')` and 2. `dvtools::install_github('ropensci/pdftools')` – br00t Oct 24 '22 at 20:10
  • @br00t. Had to restart computer so trying it again now – Tim Wilcox Oct 24 '22 at 20:20
  • 1
    @br00t, it would appear that is the case. Anyways, thanks for your assistance. Work for a govenrment and so have to rope in IT so get around this security roadblock. – Tim Wilcox Oct 24 '22 at 20:27
  • Story of my life :-) Good luck! – br00t Oct 24 '22 at 20:31

0 Answers0