linux: installation of package xx had non-zero exit status

installation of package xx had non-zero exit status

在安装包时如遇到非零错误:

  • 手动在CRAN下载包,注意依赖,CRAN页面中以import:xxx标出
install.packages("~/Downloads/MathiasHarrer-dmetar-17a76a3.tar.gz", repos = NULL, type = "source")
  • 检查 gcc,gcc-fortran环境
sudo apt install gcc-fortran
sudo pacman -S gcc-fortran
  • 检查依赖包是否不在已选镜像内,考虑去github手动下载
    例:
ERROR: dependencies ‘esc’, ‘gridExtra’, ‘netmeta’, ‘ggrepel’, ‘poibin’, ‘MuMIn’, ‘igraph’, ‘flexmix’, ‘factoextra’, ‘fpc’, ‘cowplot’, ‘mvtnorm’ are not available for package ‘dmetar’
* removing ‘/home/jsao/R/x86_64-pc-linux-gnu-library/3.6/dmetar’

依次检查:

‘esc’, ‘gridExtra’, ‘netmeta’, ‘ggrepel’, ‘poibin’, ‘MuMIn’, ‘igraph’, ‘flexmix’, ‘factoextra’, ‘fpc’, ‘cowplot’, ‘mvtnorm’

你可能感兴趣的:(linux: installation of package xx had non-zero exit status)