Hi all,
I'm trying to install the 'geomorph' package. Apparently, it depends on the package 'RRPP', which in turn depends on 'lattice'.
When I try to install 'geomorph', I get the following error:
> install.packages("geomorph")
Retrieving 'https://cran.rstudio.com/src/contrib/geomorph_3.3.2.tar.gz' ...
OK [file is up to date]
Installing geomorph [3.3.2] ...
FAILED
Error installing package 'geomorph':
====================================
* installing to library ‘/private/var/folders/sj/b05g_2wn5rvfkw9cfjcf5h8c0000gn/T/Rtmpa0Y62y/renv-staging-c4785f1e9c82’
* installing *source* package ‘geomorph’ ...
** package ‘geomorph’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error: package or namespace load failed for ‘RRPP’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so':
dlopen(/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so, 6): no suitable image found. Did find:
/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so: code signature invalid for '/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so'
Error: package ‘RRPP’ could not be loaded
Execution halted
ERROR: lazy loading failed for package ‘geomorph’
* removing ‘/private/var/folders/sj/b05g_2wn5rvfkw9cfjcf5h8c0000gn/T/Rtmpa0Y62y/renv-staging-c4785f1e9c82/geomorph’
Error: install of package 'geomorph' failed
Digging into that error message, it seems that the problem is related to 'lattice'. Indeed, I tried just loading 'lattice', and got the same message:
> library(lattice)
Error: package or namespace load failed for ‘lattice’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so':
dlopen(/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so, 6): no suitable image found. Did find:
/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so: code signature invalid for '/Users/kaijagahm/Box/BluegillMorphologyDataDOCMain/renv/library/R-4.0/x86_64-apple-darwin17.0/lattice/libs/lattice.so'
Note that install.packages("lattice")
works just fine; it's library(lattice)
that gives the error.
The error seems to be this "code signature invalid" thing. I googled a bit, and it seems that that might have to do with my OS, but I couldn't find any information about how to deal with it for R.
I've uninstalled and reinstalled lattice. I've restarted R and RStudio several times. I'm not sure how to get around this.
Probably relevant info: I am using renv, as of today. Before I started using renv, 'geomorph' installed fine. But because of some breaking changes in the most recent 'geomorph' version, I need to install an older version of the package, which is why I initialized 'renv'.
Here is my sessionInfo()
:
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/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 datasets utils methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.3 htmltools_0.5.1 tools_4.0.3 yaml_2.2.1
[5] rmarkdown_2.6 grid_4.0.3 knitr_1.30 xfun_0.20
[9] digest_0.6.27 rlang_0.4.10 renv_0.12.5 evaluate_0.14
EDITED TO ADD: I am now getting the same "code signature invalid" error for the 'MASS' package.
Thank you in advance for any help on this!