1

My aim is to install the R package "quantreg". In R Studio, I therefore type install.packages("quantreg")

R Studio then prints:

         binary source needs_compilation
quantreg   5.85   5.88              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel)

I consequently write "Yes" and hit enter. The installation then fails with the following output:

installing the source package ‘quantreg’

trying URL 'https://cran.rstudio.com/src/contrib/quantreg_5.88.tar.gz'
Content type 'application/x-gzip' length 1016964 bytes (993 KB)
==================================================
downloaded 993 KB

* installing *source* package ‘quantreg’ ...
** package ‘quantreg’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran  -fPIC  -Wall -g -O2  -c akj.f -o akj.o
make: gfortran: No such file or directory
make: *** [akj.o] Error 1
ERROR: compilation failed for package ‘quantreg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/quantreg’
Warning in install.packages :
  installation of package ‘quantreg’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/bl/yxw71y6n3ksbktr_vmp65h1m0000gn/T/Rtmpc1SB0G/downloaded_packages’

I am on Mac OS 12.3.1 Monterey and use R version 3.6.3. I use this old version of R (instead of an up-to-date one) because it is required in combination with another program that I use. Therefore, I cannot use newer versions of R.

What could be a possible fix for my problem, so that R installs quantreg without failing?

Philipp
  • 335
  • 2
  • 4
  • 12

0 Answers0