0

I've been having some problems installing the 'survival' package in R. I have tried almost everything including trying to build from source, and I'm getting this same error.

>>install.package('survival')

Error in library.dynam(lib, package, package.lib)
    shared object ‘Matrix.so’ not found
ERROR: lazy loading failed for package ‘survival’
* removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/3.4/survival’

my distro--

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial
Bari Tala
  • 37
  • 8
  • after isntlal 'rcpp' and its dependicies. i'm not getting the Lock error anymore. but still having the above error – Bari Tala Aug 26 '17 at 18:18

1 Answers1

1

Matrix.so is a shared object as part of the Matrix package. So I tried installing that by this--

>> install.packages("Matrix")
ERROR: failed to lock directory ‘/home/dave/R/x86_64-pc-linux-gnu-library/3.4’ for modifying    
Try removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/3.4/00LOCK-Matrix’

after:
sudo rm -rf /home/dave/R/x86_64-pc-linux-gnu-library/3.4/00LOCK-Matrix

Re-enter R shell and did install.packages('Matrix') and it was built properly. Then doing install.packages('survival') worked.

Bari Tala
  • 37
  • 8