R installing package 'DescTools' - "gfortran no file or directory" error

1.1k Views Asked by At

I've tried to download the package "DescTools" and I'm getting an error message while installing the dependencies ('lmom', 'gld') which I cannot solve myself. It seems like "gfortran" is the problem, I've googled it but didn't get what to do.

I've get the error code below, would appreciate if anyone could help. Working on Mac OS X.

Thanks!

> install.packages("DescTools")
> Installing package into ‘/Users/XXX/Library/R/4.0/library’
> (as ‘lib’ is unspecified)
> also installing the dependencies ‘lmom’, ‘gld’
> There are binary versions available but the source versions are later:
> binary  source needs_compilation
> lmom          2.8     2.9              TRUE
> gld         2.6.4   2.6.6              TRUE
> DescTools 0.99.44 0.99.47              TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
installing the source packages ‘lmom’, ‘gld’, ‘DescTools’

installing *source* package ‘lmom’ ...
  \*\* package ‘lmom’ successfully unpacked and MD5 sums checked
  \*\* using staged installation
  \*\* libs
  gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c d1mach.f -o d1mach.o
  make: gfortran: No such file or directory
  make: \*\*\* \[d1mach.o\] Error 1
  ERROR: compilation failed for package ‘lmom’
removing ‘/Users/XXX/Library/R/4.0/library/lmom’
  Warning in install.packages :
  installation of package ‘lmom’ had non-zero exit status
  ERROR: dependency ‘lmom’ is not available for package ‘gld’
removing ‘/Users/XXX/Library/R/4.0/library/gld’
  Warning in install.packages :
  installation of package ‘gld’ had non-zero exit status
  ERROR: dependency ‘gld’ is not available for package ‘DescTools’
removing ‘/Users/XXX/Library/R/4.0/library/DescTools’
  Warning in install.packages :
  installation of package ‘DescTools’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/fr/3xrgrwbd44vf58dqqtcml67h0000gn/T/RtmpOmArkk/downloaded_packages’
0

There are 0 best solutions below