Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load on Mac #32

Closed
kevinykuo opened this issue May 8, 2018 · 6 comments
Closed

Unable to load on Mac #32

kevinykuo opened this issue May 8, 2018 · 6 comments

Comments

@kevinykuo
Copy link

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets 
[6] methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0    yaml_2.1.19   
> install.packages("pdftools")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/pdftools_1.6.tgz'
Content type 'application/x-gzip' length 6297304 bytes (6.0 MB)
==================================================
downloaded 6.0 MB


The downloaded binary packages are in
	/var/folders/wb/9jk064jn1g70btj2nsrg864h0000gn/T//RtmpFGo7ke/downloaded_packages
> library(pdftools)
Error: package or namespace load failed for ‘pdftools’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/pdftools/libs/pdftools.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/pdftools/libs/pdftools.so, 6): Library not loaded: /opt/X11/lib/libxcb-shm.0.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/pdftools/libs/pdftools.so
  Reason: image not found

See also this SO question https://stackoverflow.com/questions/46717048/error-installing-pdftools-package-in-r

@david14142
Copy link

I get the same issue installing the binary, but building from source seems to work OK:

brew install poppler
brew install pkg-config

and then in R

install.packages('pdftools', type='source')

@jeroen
Copy link
Member

jeroen commented May 17, 2018

Thanks. It seems the cran builder by default builds against xquartz. So the immediate fix is to install xquartz.

For the next version I'll change the configuration to avoid this dependency!

@jeroen
Copy link
Member

jeroen commented May 18, 2018

I submitted a new version to cran pdftools 1.7 which should no longer depend on XQuartz.

@jeroen jeroen closed this as completed May 18, 2018
@jira0325
Copy link

jira0325 commented Feb 6, 2019

I have the same problem ! thank you david14142 :) :)

@jeroen
Copy link
Member

jeroen commented Feb 7, 2019

@jira0325 which version of pdftools do you use? This problem should be fixed.

@jira0325
Copy link

jira0325 commented Feb 7, 2019

@jeroen version 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants