Text mining with "pdftools" not working on MAC, error

Hello guys,

I am just trying to install the "pdftools" in R but its not working it shows me the following output:

install.packages("pdftools")
also installing the dependency ‘qpdf’

There are binary versions available but the source versions are later:
binary source needs_compilation
qpdf 1.1 1.2.0 TRUE
pdftools 3.1.1 3.2.1 TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) install.packages("qpdf")

If I install the "qpdf" package the following output is shown:

install.packages("qpdf")

There is a binary version available but the source version is later:
binary source needs_compilation
qpdf 1.1 1.2.0 TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel)

And after setting "yes" this is shown:

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘qpdf’

trying URL 'https://cran.rstudio.com/src/contrib/qpdf_1.2.0.tar.gz'
Content type 'application/x-gzip' length 321641 bytes (314 KB)

downloaded 314 KB

  • installing source package ‘qpdf’ ...
    ** package ‘qpdf’ successfully unpacked and MD5 sums checked
    ** using staged installation
    Using bundled qpdf (recommended)
    ./configure: line 4: pkg-config: command not found
    ** libs

Does anyone know how to solve this problem here?

Thank you in advance!

A more descriptive title would be that {pdftools} is not installing on your Mac, rather than text mining is not working.

There are current binaries of {pdftools} and {qpdf} on CRAN for both M1 and Intel versions of R 4.2 and R 4.1. Are you on an older version of R? If so, consider updating to R 4.2.

If you decide not to update, unless you need the very latest versions of those packages my suggestion is to say no to compiling from source code. The older binaries should install with no problems. If you choose to install from source then make sure you have the required compilers installed on the computer.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.