Problems installing packages under a particular user

Apologies if this is the wrong section.

I'm a sysadmins looking to setup R so users can install their own packages to a particular path.
I'm getting this error though,

> install.packages("rgdal", lib="/home/userid/R/x86_64-redhat-linux-gnu-library/3.5")
trying URL 'https://cran.csiro.au/src/contrib/rgdal_1.4-4.tar.gz'
Content type 'application/x-gzip' length 1687518 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

*** installing source package ‘rgdal’ ...**
**** package ‘rgdal’ successfully unpacked and MD5 sums checked**
configure: R_HOME: /usr/lib64/R
configure: CC: gcc -m64 -std=gnu99
configure: CXX: g++ -m64
configure: C++11 support available
configure: rgdal: 1.4-4
checking for /usr/bin/svnversion... no
configure: svn revision: 833
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
*** removing ‘/home/userid/R/x86_64-redhat-linux-gnu-library/3.5/rgdal’**
Warning in install.packages :
** installation of package ‘rgdal’ had non-zero exit status**

The downloaded source packages are in
** ‘/tmp/RtmpVEyTtl/downloaded_packages’**

The user is AD authenticated.
I also tried a local user which doesn't work either.
I configured the rsession.conf with "r-libs-user=~/R/packages"
And the rserver.conf with
rsession-ld-library-path=/opt/local/lib:/server/mycustompath

My custom path appears to have the correct permissions so not sure where to go from here.

Any help/ideas what to try next would be appreciated.
Cheers

This has nothing to do with user permissions, you are missing a system dependency, libgdal is a system library not an R package.

I haven't used Redhat in eons, but in Ubuntu, you'd

sudo apt install libgdal

which should put all the gdal you need in a all-user readable location.

You may need to do the same with the Proj library

Thanks for the help guys.
I assumed that when installing some libraries it would install the necessary dependencies as per the ticked option in RStudio to install dependencies.
I'll give that a bash.

That option refers to R packages only, unfortunately you have to solve system dependencies manually.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.