R: Error in dyn.load (file, DLLpath = DLLpath, ...)

I worked for some time on Project R on the desktop of my office, but I need to carry scripts with me during the trip. I copied everything to my laptop and made some changes to the code. Alas, when you try to compile (following the same procedure that I used on my desktop computer), the following error:

$ R CMD INSTALL --no-multiarch --with-keep.source coala * installing to library '/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3' * installing *source* package 'coala' ... ** libs make: Nothing to be done for `all'. installing to /home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs/coala.so': /home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs/coala.so: undefined symbol: _ZSt24__throw_out_of_range_fmtPKcz Error: loading failed Execution halted ERROR: loading failed * removing '/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala' * restoring previous '/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala' 

Both computers have the same Ubuntu, but a different version of R. In addition, I must mention that I work in two libraries at the same time and that updating the companion library is no problem, which makes this error message more cryptic. I checked the answers that may be related to this question, but cannot figure out how to apply their solutions:

R: error installing packages UBUNTU - error in dyn.load (file, DLLpath = DLLpath, ...): unable to load the general object A message was received that could not load the general statistics of the object when R starts

Is there any way to solve this problem? What could be the reason? What does the undefined _ZSt24__throw_out_of_range_fmtPKcz symbol _ZSt24__throw_out_of_range_fmtPKcz ?

+5
source share
2 answers

What does .libPaths() mean as output?

I ran into the same problem using the latest update today ( R 3.3.1 for MacOS X ). My R installation seems to have crashed after the upgrade. My solution was to simply remove the lib directories from the file system and reinstall R:

 rm -rf /Users/johann/Library/R/3.3/library sudo rm -rf Library/Frameworks/R.framework/Versions/3.3/Resources/library 

Hope this helps ...

+1
source

The problem is with your g ++ stdlib. Different versions of Ubuntu have different versions of g ++ stdlib. You do not always copy binaries from one to another.

You can fix this by recompiling R for a laptop or using Ubuntu R. packages like http://packages.ubuntu.com/xenial/r-base

0
source

All Articles