title: R: Error in dyn.load(file, DLLpath = DLLpath, ...)
body: <p>I have worked now for some time on an R project in my office's desktop computer, but need to carry the scripts with me while on travel. I copied everything into my laptop and did some changes to the code. Alas, when trying to compile (following the exact same procedure I was using in my desktop computer), the following error:</p>
  
  <pre><code>$ 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’
  </code></pre>
  
  <p>Both computers have the same Ubuntu but different R version. Also, I have to mention that I am working in two libraries at the same time and that the accompanying library update without problems, which makes this error message more puzzling. I have checked answers that may be related to this question, but can't figure out how to apply their solutions:</p>
  
  <p><a href="https://stackoverflow.com/questions/33588083/r-error-installing-packages-ubuntu-error-in-dyn-loadfile-dllpath-dllpath">R: error installing packages UBUNTU - Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object</a>
  <a href="https://stackoverflow.com/questions/21333097/got-message-unable-to-load-shared-object-stats-so-when-r-starts">Got message unable to load shared object stats.so when R starts</a></p>
  
  <p>Is there a way to solve this problem? Which may be the cause? What is the undefined symbol <code>_ZSt24__throw_out_of_range_fmtPKcz</code>?</p>