ropensci / pdftools

Text Extraction, Rendering and Converting of PDF Documents
https://docs.ropensci.org/pdftools
Other
513 stars 69 forks source link

Namespace error on library(pdftools) #96

Closed allmedia-nz closed 2 years ago

allmedia-nz commented 2 years ago

After update.packages() (with error: package ‘Rcpp’ successfully unpacked and MD5 sums checked Warning: cannot remove prior installation of package ‘Rcpp’ Warning: restored ‘Rcpp’)

library(pdftools) Error message: Error: package or namespace load failed for ‘pdftools’: .onLoad failed in loadNamespace() for 'pdftools', details: call: set_poppler_data(datapath) error: function 'Rcpp_precious_remove' not provided by package 'Rcpp' Traceback: 6. stop(msg, call. = FALSE, domain = NA) 5. value[3L] 4. tryCatchOne(expr, names, parentenv, handlers[[1L]]) 3. tryCatchList(expr, classes, parentenv, handlers) 2. tryCatch({ attr(package, "LibPath") <- which.lib.loc ns <- loadNamespace(package, lib.loc) env <- attachNamespace(ns, pos = pos, deps, exclude, include.only) ... 1. library(pdftools)

This is the only package I seem to have problems with, Any suggestions most welcome.

jeroen commented 2 years ago

You need to update Rcpp. Quit all your R sessions, and then start a clean new fresh R session and run:

install.packages("Rcpp")

After that you will be able to install pdftools.