Hi @Debayan Mukherjee thanks for your reply, here are my R/Databricks details and the 3 main libraries and errors i am encountering:
platform x86_64-pc-linux-gnu
version.string R version 4.1.3 (2022-03-10)
Runtime
11.3.x-scala2.12
11.3 LTS (includes Apache Spark 3.3.0, Scala 2.12)
gdal
%r
install.packages("gdal", repos = "http://cran.us.r-project.org")
Installing package into ‘/local_disk0/.ephemeral_nfs/envs/rEnv-93f5aa20-8204-42c9-b813-cda1cb27ae08’
(as ‘lib’ is unspecified)
Warning: package ‘gdal’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
terra
%r
install.packages("terra", repos = "http://cran.us.r-project.org")
* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++14
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/local_disk0/.ephemeral_nfs/envs/rEnv-93f5aa20-8204-42c9-b813-cda1cb27ae08/terra’
Installing package into ‘/local_disk0/.ephemeral_nfs/envs/rEnv-93f5aa20-8204-42c9-b813-cda1cb27ae08’
(as ‘lib’ is unspecified)
trying URL 'http://cran.us.r-project.org/src/contrib/terra_1.7-29.tar.gz'
Content type 'application/x-gzip' length 806064 bytes (787 KB)
==================================================
downloaded 787 KB
Warning in utils::install.packages(pkgs, ...) :
installation of package ‘terra’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpPqEEXP/downloaded_packages’
raster
%r
install.packages("raster", repos = "http://cran.us.r-project.org")
* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++14
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/local_disk0/.ephemeral_nfs/envs/rEnv-93f5aa20-8204-42c9-b813-cda1cb27ae08/terra’
ERROR: dependency ‘terra’ is not available for package ‘raster’
* removing ‘/local_disk0/.ephemeral_nfs/envs/rEnv-93f5aa20-8204-42c9-b813-cda1cb27ae08/raster’
Installing package into ‘/local_disk0/.ephemeral_nfs/envs/rEnv-93f5aa20-8204-42c9-b813-cda1cb27ae08’
(as ‘lib’ is unspecified)
also installing the dependency ‘terra’
trying URL 'http://cran.us.r-project.org/src/contrib/terra_1.7-29.tar.gz'
Content type 'application/x-gzip' length 806064 bytes (787 KB)
==================================================
downloaded 787 KB