无法安装包车

时间:2016-02-26 09:14:04

标签: r 64-bit mint install.packages r-car

我在Linux模型17.3 64位中使用R版本3.2.3。我试图使用dependencies=TRUE安装软件包“car”,但安装失败并显示以下错误消息:

> warnings()
Warning messages:
1: In install.packages("car", dependencies = T) :
installation of package ‘minqa’ had non-zero exit status
2: In install.packages("car", dependencies = T) :
installation of package ‘RcppEigen’ had non-zero exit status
3: In install.packages("car", dependencies = T) :
installation of package ‘leaps’ had non-zero exit status
4: In install.packages("car", dependencies = T) :
installation of package ‘lmtest’ had non-zero exit status
5: In install.packages("car", dependencies = T) :
installation of package ‘rgl’ had non-zero exit status
6: In install.packages("car", dependencies = T) :
installation of package ‘SparseM’ had non-zero exit status
7: In install.packages("car", dependencies = T) :
installation of package ‘quantreg’ had non-zero exit status
8: In install.packages("car", dependencies = T) :
installation of package ‘lme4’ had non-zero exit status
9: In install.packages("car", dependencies = T) :
installation of package ‘effects’ had non-zero exit status
10: In install.packages("car", dependencies = T) :
installation of package ‘pbkrtest’ had non-zero exit status
11: In install.packages("car", dependencies = T) :
installation of package ‘car’ had non-zero exit status
12: In install.packages("car", dependencies = T) :
installation of package ‘alr4’ had non-zero exit status

如何解决此问题?请帮忙。

5 个答案:

答案 0 :(得分:6)

我终于找到了解决方案。在查看安装“minqa”的错误消息后,我意识到安装程序无法找到gfortran。所以我安装了gfortran,然后再尝试安装“汽车”。这次我收到另一条错误消息,指出找不到-llapack -lblas。因此,根据此链接:/usr/bin/ld: cannot find -llapack 我安装了软件包“liblapack-dev”,“liblapack3”,“libopenblas-base”和“libopenblas-dev”。之后,“car”包已成功安装。

答案 1 :(得分:4)

安装r-cran-car

在Ubuntu 16.04(Xenial Xerus)上安装r-cran-car软件包就像在终端上运行以下命令一样简单:

sudo apt-get update

sudo apt-get install r-cran-car

答案 2 :(得分:3)

我有同样的问题。在我的情况下,只需在我的机器上安装gcc-fortran即可。

答案 3 :(得分:1)

如果您使用的是Anaconda,请考虑通过conda安装gfortran软件包。例如,on Mac

conda install -c anaconda gfortran_osx-64 

答案 4 :(得分:0)

浏览install.packages("car")的输出时,出现下一条错误消息:

/bin/bash: gfortran: command not found
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas

将相关程序包添加到我的Ubuntu系统后,一切正常。

sudo apt-get install gfortran liblapack-dev libblas-dev