安装lmtest包源

时间:2016-12-08 18:32:29

标签: r

我想安装lmtest的源代码。我尝试了以下,并得到了一个错误。任何帮助表示赞赏。谢谢。

> install.packages("https://cran.r-project.org/src/contrib/lmtest_0.9-34.tar.gz", repo=NULL, type="source")

trying URL 'https://cran.r-project.org/src/contrib/lmtest_0.9-34.tar.gz'
Content type 'application/x-gzip' length 180257 bytes (176 KB)
==================================================
downloaded 176 KB

> * installing *source* package ‘lmtest’ ...
> ** package ‘lmtest’ successfully unpacked and MD5 sums checked
> ** libs gfortran-4.8   -fPIC  -g -O2  -c pan.f -o pan.o make: gfortran-4.8: No such file or directory make: *** [pan.o] Error 1
> ERROR: compilation failed for package ‘lmtest’
> * removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/lmtest’
> Warning in install.packages :   installation of package
> ‘/var/folders/z6/1rpmk8d971n2864kd2d514g40000gn/T//RtmpXtgPIq/downloaded_packages/lmtest_0.9-34.tar.gz’
> had non-zero exit status

1 个答案:

答案 0 :(得分:0)

lmtest取决于包carA related question has been posted previously关于安装car的问题。 OP以additional details on resolving the issue回复。

其中一个问题是gfortran不可用,这是一个系统包。根据我的经验,"非零退出状态"一直是因为包依赖于一个不可用的系统包。