1

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’
LeCV
  • 11
  • 2
  • 1
    Have you installed gfortran? Is it in your path? – francescalus Oct 25 '22 at 13:27
  • 1
    You’re installing source packages, which need to be compiled. As @francescalus suggests, it looks like you don’t have gfortran either installed or on your path. You can probably solve the issue by installing the binary packages when asked if you want source or binary installation. – Limey Oct 25 '22 at 13:44
  • Thanks @Limey, as simple as that, simply had to choose No to download from binary instead of source. Appreciate the help – LeCV Oct 25 '22 at 13:51

0 Answers0