Missing package `udunits2` on CentOS

goollan asked:

I’d like to use gganimate, but it requires the package sf.

I tried to install, but I get this error.

configure: error: in `/tmp/RtmpEpee0m/R.INSTALL282e663ea13f/units':
configure: error: 
--------------------------------------------------------------------------------
  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.
--------------------------------------------------------------------------------

See `config.log' for more details
ERROR: configuration failed for package ‘units’
* removing ‘/home/User/R/x86_64-pc-linux-gnu-library/3.5/units’

I’m on CentOS hosted on EC2 and I’m unable to install libudunits2.so.

I’ve tried

sudo yum install udunits2-dev
sudo yum install udunits2-devel
sudo yum install udunits2
sudo yum install libcairo2-devel libjpeg8-devel libpango1.0-devel libgif-devel build-essential g++
sudo yum install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++

For each of those commands, I get back No package available

My answer:


The correct package name is udunits2-devel and it is in the EPEL repository.

Before you can install this package, you need to enable EPEL on your system. Do this by installing the epel-release RPM:

sudo yum install epel-release

After it is installed, then you can install udunits2-devel.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.