I'm using Jupyter Notebook in GCP, and I'm having issues installing several R libraries (rgdal, SF, move, mapview, and others).
I've tried many suggestions from other posts (changing the library path, adding repos path, set dependencies to true, installing packages in the terminal), but the error persists. Please see below.
install.packages("rgdal",repos = "http://cran.us.r-project.org")
Installing package into ‘/home/jupyter/.R/library’
(as ‘lib’ is unspecified)
Warning message in install.packages("rgdal", repos = "http://cran.us.r-project.org"):
“installation of package ‘rgdal’ had non-zero exit status”
Here is my R Session info:
sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] fansi_0.5.0 digest_0.6.27 utf8_1.2.2 crayon_1.4.1
[5] IRdisplay_1.0 repr_1.1.3 lifecycle_1.0.0 jsonlite_1.7.2
[9] evaluate_0.14 pillar_1.6.2 rlang_0.4.11 uuid_0.1-4
[13] vctrs_0.3.8 ellipsis_0.3.2 IRkernel_1.2 tools_4.0.5
[17] fastmap_1.1.0 compiler_4.0.5 base64enc_0.1-3 pbdZMQ_0.3-5
[21] htmltools_0.5.2
Here are the .libPaths I've tried installing to. If I don't get the non-zero warning then I get a warning that the library is not writable. :
'/home/jupyter/.R/library''/usr/local/lib/R/site-library''/usr/lib/R/site-library''/usr/lib/R/library'