Hmsc installation issues

Hi everyone ,
I need to install Hmsc package.
I type install.packages("Hmsc") and Hmsc packages pops up between my packages.
But if I type library(Hmsc) I got this error message
Error: package or namespace load failed for ‘Hmsc’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘quantreg’ .
I try installing quant reg typing install.packages("quantreg") but I got the following error message and the package does not pop up in my packages

There is a binary version available but the source version is later:

  •     binary source needs_compilation*
    

quantreg 5.88 5.93 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘quantreg’

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

** installing source package ‘quantreg’ ...*
*** package ‘quantreg’ 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 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/4.2/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/ly/sqspckhn1jq35lrxxr76402m0000gn/T/Rtmp6m2TCK/downloaded_packages’*

and I try typing again library(Hmsc) I got the same error message
Error: package or namespace load failed for ‘Hmsc’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘quantreg’ .

I would be really grateful if anyone could help me
Thanks everyone

The easiest solution would be to answer "no" to this question, you would get a precompiled binary version that is a little older but much easier to install.
If you need to install the latest version from source, then you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems.
https://mac.r-project.org/tools/

This part of the error message is saying that you need a GNU fortran compiler in order to install quantreg from source. Depending on your computer, gfortran binaries can be installed from https://mac.r-project.org/tools/, but it will take a bit of configuring to get it to work.

Problem solved. Thank you very much!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.