Closed dcaud closed 2 years ago
I also can't seem to revert to an older version, so I'm stuck. Any help would be appreciated.
devtools::install_version("pdftools", version = "2.3.1")
fails with
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/pdftools/pdftools_2.1.tar.gz
- installing source package ‘pdftools’ ... package ‘pdftools’ successfully unpacked and MD5 sums checked using staged installation 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 Homebrew 3.3.9 Homebrew/homebrew-core (git revision e251e3ffc46; last commit 2022-01-03) Homebrew/homebrew-cask (git revision 64ab035cd4; last commit 2022-01-03) Using PKG_CFLAGS=-I/usr/local/opt/poppler/include/cpp Using PKG_LIBS=-L/usr/local/opt/poppler/lib -lpoppler-cpp 'config' variable 'CXXCPP' is defunct ------------------------- 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 ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/pdftools’ Warning message: In i.p(...) : installation of package ‘/var/folders/x5/lxrbhxtw8v55k1006s6kjjfr0000gp/T//RtmpwTaVP6/remotes6be225befa2/pdftools’ had non-zero exit status
I think the problem with using the new version is gone, after this: brew install xquartz
I think the problem with using the new version is gone, after this:
brew install xquartz
Yes, you are absolutely correct for my case also it is solved now for macOS Monterey. Thank you very much.
@s-u can we please try to avoid the xquartz dependency for your poppler/cairo builds? Many people don't have this; the autobrew builds for cairo/poppler that we were using before did not have this problem.
This issue persists on Arm Macs. My device specs are as follows: Chip: Apple M1 Pro MacOS Monterey 12.3.1
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/pdftools/libs/pdftools.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/pdftools/libs/pdftools.so, 0x0006): Library not loaded: /opt/X11/lib/libXrender.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/pdftools/libs/pdftools.so
Reason: tried: '/opt/X11/lib/libXrender.1.dylib' (no such file), '/usr/lib/libXrender.1.dylib' (no such file)
brew install xquartz
does fix the problem. Thank you @dcaud
This is a bug caused by the CRAN build system. A workaround is to install pdftools from r-universe:
install.packages("pdftools", repos = "https://ropensci.r-universe.dev")
I have added a workaround now.
Awesome, thank you @jeroen !
After updating the library,
library(pdftools)
now produces:Here's my session info: