需要安装PMCMRplus这个R包
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("PMCMRplus")
报错:
configure: error: Header file mpfr.h not found; maybe use --with-mpfr-include=INCLUDE_PATH
ERROR: configuration failed for package ‘Rmpfr’
* removing ‘/home/ytbao/R/x86_64-pc-linux-gnu-library/4.0/Rmpfr’
ERROR: dependency ‘Rmpfr’ is not available for package ‘PMCMRplus’
查资料,查到了 Installation of PMCMRplus and (external) dependencies 安装 PMCMRplus 和(外部)依赖项
服务器是 CentOS,在里面找到了解决方法:
sudo dnf install gmp-devel
sudo dnf install mpfr-devel
还看到了这个回答
就先安装了 mpfr-devel,
sudo dnf install mpfr-devel
安装成功后,试了下重装R包:
BiocManager::install("PMCMRplus")
安装成功了,library(PMCMRplus) 也成功了。就没有执行 sudo dnf install gmp-devel 了