CentOS 上缺少软件包 `udunits2`

CentOS 上缺少软件包 `udunits2`

我想使用gganimate,但它需要包sf

我尝试安装,但出现此错误。

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’

我在 EC2 上托管的 CentOS 上,无法安装libudunits2.so

我试过了

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++

对于每个命令,我都会返回No package available

答案1

正确的包名称是udunits2-devel,正如您发布的输出所示,它位于电力供应处存储库。

在安装此软件包之前,您需要在系统上启用 EPEL。通过安装 RPM 来执行此操作epel-release

sudo yum install epel-release

安装完成后,即可安装udunits2-devel

相关内容