I am trying to install CRANs population genetics package hierfstat; however the following error with libproj.so.13 is printed:
> install.packages("hierfstat")
Installing package into ‘/home/ecoevo/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/hierfstat_0.04-22.tar.gz'
Content type 'application/x-gzip' length 460778 bytes (449 KB)
==================================================
downloaded 449 KB
* installing *source* package ‘hierfstat’ ...
** package ‘hierfstat’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/ecoevo/R/x86_64-pc-linux-gnu-library/3.6/sf/libs/sf.so':
libproj.so.13: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘hierfstat’
* removing ‘/home/ecoevo/R/x86_64-pc-linux-gnu-library/3.6/hierfstat’
* restoring previous ‘/home/ecoevo/R/x86_64-pc-linux-gnu-library/3.6/hierfstat’
Warning in install.packages :
installation of package ‘hierfstat’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpXDoNEK/downloaded_packages’
Any suggestions on how to fix this error? I am working on Ubuntu-20.04
libproj-dev
OS package (that's the name for ubuntu, not sure what other distros use). (I don't know, just an idea.) – Bodnarsudo apt install -y libproj-dev
), but re-installing R package proj4 did resolve the issue:install.packages("proj4")
. R pkg proj4 must have remembered the previous PROJ4 headers, which have been upgraded (to a new version under a new file path) since. – Graveclothes