title: Error installing package pdftools in R server
body: <p>I am using <strong>R server on Windows</strong> and I need to extract the text of thousands of pdf documents (in order to extract specific data). Thus, I need to install the package "pdftools", though when I do the command to install it :</p>
  
  <pre><code>install.packages("pdftools")
  </code></pre>
  
  <p>I get the following error :</p>
  
  <pre><code>Installing package into ‘/home/allusers/recette/R/x86_64-redhat-linux-gnu-library/3.4’
  
  (as ‘lib’ is unspecified)
  trying URL 'https://cran.rstudio.com/src/contrib/pdftools_1.5.tar.gz'
  Content type 'application/x-gzip' length 811447 bytes (792 KB)
  
  ==================================================
  downloaded 792 KB
  
  * installing *source* package ‘pdftools’ ...
  ** package ‘pdftools’ successfully unpacked and MD5 sums checked
  Package poppler-cpp was not found in the pkg-config search path.
  Perhaps you should add the directory containing `poppler-cpp.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'poppler-cpp' found
  Using PKG_CFLAGS=-I/usr/include/poppler/cpp -I/usr/include/poppler
  Using PKG_LIBS=-lpoppler-cpp
  
  ------------------------- ANTICONF ERROR ---------------------------
  Configuration failed because poppler-cpp was not found. Try installing:
   * deb: libpoppler-cpp-dev (Debian, Ubuntu, etc)
   * rpm: poppler-cpp-devel (Fedora, CentOS, RHEL)
   * csw: poppler_dev (Solaris)
   * brew: poppler (Mac OSX)
  If poppler-cpp is already installed, check that 'pkg-config' is in your
  PATH and PKG_CONFIG_PATH contains a poppler-cpp.pc file. If pkg-config
  is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
  R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
  --------------------------------------------------------------------
  
  ERROR: configuration failed for package ‘pdftools’
  * removing ‘/home/allusers/recette/R/x86_64-redhat-linux-gnu-library/3.4/pdftools’
  Warning in install.packages :
    installation of package ‘pdftools’ had non-zero exit status
  
  The downloaded source packages are in
      ‘/tmp/Rtmp3ZNfGJ/downloaded_packages’
  </code></pre>
  
  <p>Did this happen to anyone before? Also I get that the error comes from "poppler-cpp". Thus I tried to install the package "poppler-cpp" but I get the following error cause this is not available for the 3.4.1 R version</p>
  
  <pre><code>Warning in install.packages :
    package ‘poppler-cpp’ is not available (for R version 3.4.1)
  </code></pre>
  
  <p><strong>Update : Writing this command in the terminal worked</strong></p>
  
  <pre><code>$ sudo yum install poppler-cpp-devel
  </code></pre>
  
  <p>But then another error showed :</p>
  
  <pre><code>Error in .shlib_internal(args) : 
    C++11 standard requested but CXX11 is not defined
  </code></pre>