r – Package missing `udunits2` under CentOS

I would like to use gganimatebut you need the package sf.

I have tried to install but I get this error.

configure: error: in `/tmp/RtmpEpee0m/R.INSTALL282e663ea13f/units:
configure: error:
-------------------------------------------------- ------------------------------
The configuration failed because libudunits2.so was not found. Try to install:
* 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 & # 39;
if the library has not been found and / or:
--configure-args = - with-udunits2-include = / usr / include / udunits2 & # 39;
if the header was not found, replace the paths with the appropriate values.
You can also set UDUNITS2_INCLUDE and UDUNITS2_LIBS manually.
-------------------------------------------------- ------------------------------

See `config.log & # 39; for more details
ERROR: configuration failed for package 'units'
* remove "/home/User/R/x86_64-pc-linux-gnu-library/3.5/units"

I am on CentOS hosted on EC2 and I can not install libudunits2.so.

I have 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 these commands, I'll come back No packages available