1

I'm wanting to install lmtest's source code. I tried the following, and got an error. Any help is appreciated. Thanks.

> 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
Pierre L
  • 28,203
  • 6
  • 47
  • 69
Anika
  • 11
  • 1
  • 2
  • `make: gfortran-4.8: No such file or directory` This probably is leading to error. Make a folder and try to re-install – user5249203 Dec 08 '16 at 18:46

1 Answers1

1

lmtest depends on the package car. A related question has been posted previously about issues installing car. OP responded with additional details on resolving the issue.

One of the issues is that gfortran is not available which is a system package. In my experience the "non-zero exit status" has been because the package relies on a system package that isn't available.

Community
  • 1
  • 1
timtrice
  • 307
  • 3
  • 12