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
Related
I just started with Rstudio programming and I have some issues with XLConnect.
I was able to install "XLConnect" package, then tried to load the "XLConnect" library and got an error as below.
library(XLConnect)
ERROR: package or namespace load failed for'XLconnect':
.onload failed in loadNamespace() for XLConnect, details:
Call. System2("cat",c("/etc/*-release"), stdout =TRUE, stderr = TRUE) error: ' "cat" not found.
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Italian_Switzerland.1252 LC_CTYPE=Italian_Switzerland.1252 LC_MONETARY=Italian_Switzerland.1252 LC_NUMERIC=C
[5] LC_TIME=Italian_Switzerland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0 rJava_1.0-4
Any help would be really appreciated!
Thanks
This is a bug in XLConnect 1.0.3, where it requires cat to be installed on Windows. We fixed it in 1.0.4, so upgrading is the easiest way to fix the problem.
If for some reason you can't upgrade, you may try to install cat on Windows, e.g. using MINGW-w64.
See https://github.com/miraisolutions/xlconnect/issues/132 for the discussion.
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
I have installed R-3.6.1 on 64 bit slackware v14.2-current. I am trying to install an R library, rgdal. I have tried the installation from within R with
install.packages("rgdal")
and
The installation fails with the error:
...
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/user/R/x86_64-slackware-linux-gnu-library/3.6/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
libgdal.so.20: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/user/R/x86_64-slackware-linux-gnu-library/3.6/rgdal’
My GDAL installation:
bash-5.0$ gdalinfo --version
GDAL 2.4.4, released 2020/01/08
Search for libgdal:
bash-5.0$ locate libgdal.so
/usr/local/lib/libgdal.so
/usr/local/lib/libgdal.so.26
/usr/local/lib/libgdal.so.26.0.1
I tried
install.packages('rgdal', type = "source", configure.args=c('--with-libgdal=/usr/local/lib/libgdal.so.26'))
not having any idea what would happen. It failed with the same error message as above.
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-slackware-linux-gnu (64-bit)
Running under: Slackware 14.2 x86_64 (post 14.2 -current)
Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1 tcltk_3.6.1
R/rgdal is searching for libgdal.so.20 and I have .26, but no .20. I don't know how to, and if I should, point the install.packages() function at v.26. Will it work if the script points at .26? How do I get the script to point to the newer version of libgdal.so?
EDIT-After the comment from Roman Luštrik, I copied
cp /usr/local/lib/libgdal.so.26 /usr/lib64/
cp /usr/local/lib/libgdal.so /usr/lib64/
Then tried install.packages("rgdal") again. It failed again with a similar error message as first, except now it was missing "libproj.so.15". Thus, repeated steps:
cp /usr/local/lib/libproj.so /usr/lib64
cp /usr/local/lib/libproj.so.15 /usr/lib64
Tried install.packages("rgdal") again. This time the error was
Error: proj/epsg not found
Either install missing proj support files, for example
the proj-nad and proj-epsg RPMs on systems using RPMs,
or if installed but not autodetected, set PROJ_LIB to the
correct path, and if need be use the --with-proj-share=
configure argument.
bash-5.0# export PROJ_LIB=/usr/share/proj
bash-5.0# echo $PROJ_LIB
/usr/share/proj
Try install.packages("rgdal") again. Now the error is:
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/user/R/x86_64-slackware-linux-gnu-library/3.6/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
/home/user/R/x86_64-slackware-linux-gnu-library/3.6/00LOCK-rgdal/00new/rgdal/libs/rgdal.so:
undefined symbol: pj_get_ellps_ref
I have been trying to install RQuantLib in RStudio but want to know if someone found a workaround to get it up and running in MAC OSX Mavericks:
I have downloaded the OS X Snow Leopard binaries (because Mavericks are not available) from:
CRAN
When I run the following code, it says I have installed the package:
install.packages("/Volumes/3TB/R/RQuantLib_0.3.12.tgz", repos = NULL, type='source')
* installing *binary* package ‘RQuantLib’ ...
* DONE (RQuantLib)
However, when i try to load it, it fails:
library("RQuantLib")
Error : .onLoad failed in loadNamespace() for 'RQuantLib', details:
call: if (is.character(qc) && nchar(qc) > 1) {
error: missing value where TRUE/FALSE needed
In addition: Warning message:
running command 'bash -c 'type -p quantlib-config' 2>/dev/null' had status 1
Error: package or namespace load failed for ‘RQuantLib’
Can someone please help me out ?
Session info:
sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
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] blotter_0.8.19 grid_3.1.2 lattice_0.20-29 quantstrat_0.8.2 Rcpp_0.11.4 tools_3.1.2 zoo_1.7-11
You need to first install QuantLib on your computer in order to use RQuantLib.
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.