I'm having trouble loading lme4 (as well as some other packages such as glmmTMB, all with the same error messages). The error message is as below,
Loading required package: Matrix
Error: package or namespace load failed for ‘lme4’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/statmod/libs/statmod.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/statmod/libs/statmod.so, 6): Library not loaded: /usr/local/gfortran/lib/libgfortran.5.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/statmod/libs/statmod.so
Reason: image not found
My sessionInfo() is as below as well,
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.3
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.6/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Matrix_1.2-18
loaded via a namespace (and not attached):
[1] compiler_3.6.2 tools_3.6.2 splines_3.6.2 grid_3.6.2 packrat_0.5.0 lattice_0.20-40
It was all working fine and then all of sudden this happened, I'm not even sure why or how. Would really appreciate any help!
For anyone stuck with this or a similar issue, this was solved by installing a the package statmod. Please see here for more details
Related
I'm trying to install Rmpi on my macbook. However, I keep running into this error where Rmpi.so cannot be loaded. When I tried to load Rmpi, this is the error:
Error: package or namespace load failed for ‘Rmpi’:
.onLoad failed in loadNamespace() for 'Rmpi', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rmpi/libs/Rmpi.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rmpi/libs/Rmpi.so, 6): Symbol not found: _ompi_mpi_2int
Referenced from: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rmpi/libs/Rmpi.so
Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rmpi/libs/Rmpi.so
The steps that I took was as follow: First I installed openmpi
brew install open-mpi
Then I installed Rmpi as follow:
R CMD INSTALL Rmpi_0.6-9.2.tar.gz --configure-args="--with-Rmpi-include=/opt/homebrew/include --with-Rmpi-libpath=/opt/homebrew/lib --with-Rmpi-type=OPENMPI" --no-test-load
I've tried to export the LD_LIBRARY_PATH to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rmpi/libs/Rmpi.so but this does not work either. Is there a way to fix this?
this is my session info:
R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/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 methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.0 parallel_4.2.0 tools_4.2.0
In some ways this is a continuation of this older post, R packages with Rcpp and nloptr.
Mostly, this solution proved temporary, for several reasons, some minor, but mostly I am working to prefect this project for a cran submission and this remains the last hurdle.
That said, I attempted and failed to get this example running https://github.com/jyypma/nloptr/issues/39.
The error here is "..../sourceCpp_2.so Reason: image not found"
After, this I made a test package with nlopt installed into the 'inst' folder and 'makevars' and 'makevars.win' in the 'src' along with the test example from above.
This package is now on GitHub: https://github.com/shortyatz/Nlopt-and-Rcpp.
And gives me a similar error message to the one above.
Here is my session info:
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
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 methods base
other attached packages:
[1] Rcpp_0.12.18
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 RcppArmadillo_0.8.600.0.0 yaml_2.2.0
I needed to reinstall R after experiencing the blank non-functional Rstudio. After that I got into big troubles with Rstudio, which now would start but is reacting in a weird way. I installed many times ggplot2 and other packages, after which I am getting a message like:
package ‘ggplot2’ successfully unpacked and MD5 sums checked. The downloaded binary packages are in C:\Users\absolution\AppData\Local\Temp\RtmpIJr2z3\downloaded_packages
But when I upload them I am getting an error message:
Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):cannot open file 'C:/Users/absolution/Documents/R/win-library/3.4/Rcpp/R/Rcpp.rdb': No such file or Directory
During this process I also observed twice a pop-up window asking if I would like to create a personal library, I clicked once no and the second time yes. So I dont know whats going on.
Here is what I got in the sessionInfo():
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 gtable_0.2.0 grid_3.4.4
I will highly appreciate your help.
I'm unable to download packages in R when using a Mac. I've tried the simple suggested solutions. Please help.
ERROR: compilation failed for package ‘lmtest’
* removing ‘/Users/Saundy/Library/R/3.4/library/lmtest’
Warning in install.packages :
installation of package ‘lmtest’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/b7/6zytq47j2k5d3knkv0zjtzbm0000gn/T/RtmpMY0uuf/downloaded_packages’
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS High Sierra 10.13.1
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.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 methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2 yaml_2.1.14
I am developping R packages with Rstudio. Until now, I used R 3.1.2 and all worked fine. Recently I have updated R to 3.2.0 version and I have updated the packages too. Now, when loading devtools:
> library(devtools)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Documents and Settings/cruiz.CREAL/Mis documentos/R/win-library/3.2/git2r/libs/i386/git2r.dll':
LoadLibrary failure: No se encontró el proceso especificado.
Error: package or namespace load failed for ‘devtools’
I have reinstalled devtools and git2r with biocLite and with install.packages and it didn't work. This file already exists and it is on this path.
My R session Info:
R version 3.2.0 (2015-04-16)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows XP (build 2600) Service Pack 3
locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
[3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Spain.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.0
Thank you very much!
I suggest the following:
remove.packages(c("git2r", "devtools", "rversions")).
Use the information from my answer on this post -- R - Error installing Devtools in Windows to reinstall devtools. This should also reinstall the needed dependencies.