I get the following error at the end of installing terra on linux:
(I have used this package since years ago and installed it several times, and never had this problem):
> install.packages("terra")
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘terra’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/alobo/R/x86_64-pc-linux-gnu-library/4.4/00LOCK-terra/00new/terra/libs/terra.so':
libproj.so.25: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/alobo/R/x86_64-pc-linux-gnu-library/4.4/terra’
> sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Pop!_OS 22.04 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
I’ve checked:
$ sudo apt-get install libgsl-dev
[sudo] password for alobo:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libgsl-dev is already the newest version (2.7.1+dfsg-3).
libgsl-dev set to manually installed.
as well as libgdal-dev libgeos-dev libproj-dev
and run
$ sudo ldconfig