1

I am using R on a shared cluster, which uses CentOS7.

I only have issues with installing this specific package, "sf" (simple features).

I have tried a solution from another post - pass configure arguments to install packages in R but it still ran the same error.

I also asked the program administrator for our university's cluster, and he reassured that udunits2 is already installed in this library (/usr/include/udunits2/).

install.packages('sf',configure.args=c(sf="--with-udunits2-include=/usr/include/udunits2")
...
Configuration failed because libudunits2.so was not found. Try installing:
    * deb: libudunits2-dev (Debian, Ubuntu, ...)
    * rpm: udunits2-devel (Fedora, EPEL, ...)
    * brew: udunits (OSX)
  If udunits2 is already installed in a non-standard location, use:
    --configure-args='--with-udunits2-lib=/usr/local/lib'
  if the library was not found, and/or:
    --configure-args='--with-udunits2-include=/usr/include/udunits2'
  if the header was not found, replacing paths with appropriate values.
  You can alternatively set UDUNITS2_INCLUDE and UDUNITS2_LIBS manually.
  • udunits2 is not the same as udunits2-devel. Look the answer in https://stackoverflow.com/questions/42287164/install-udunits2-package-for-r3-3 – crestor Apr 12 '21 at 22:04
  • Does this answer your question? [Install udunits2 package for R3.3](https://stackoverflow.com/questions/42287164/install-udunits2-package-for-r3-3) – crestor Apr 12 '21 at 22:05
  • Thank you, unfortunately, I do not have sudo access to try "sudo yum install udunits2-devel". I also tried the other comment on cluster without root access, but it ran this error "No such file ‘udunits-2.2.25.tar.gz’." – Chila Inocencio Apr 17 '21 at 22:04
  • @crestor, I just confirmed that udunits2-devel (udunits2-devel-2.2.20-2.el7.x86_64) is already installed, but it still running the same error. – Chila Inocencio Apr 19 '21 at 20:21

1 Answers1

0

Update:

I am now able to install "sf" on our cluster (which uses CentOS 7) using conda (https://anaconda.org/conda-forge/r-sf).

conda install -c conda-forge r-sf