Errors in installing the package for Mac M1

library(pacman)
> library(devtools)
Loading required package: usethis
> 
> devtools::install_github("xia-lab/MetaboAnalystR", build = TRUE, build_vignettes = TRUE, build_manual =T)
Downloading GitHub repo xia-lab/MetaboAnalystR@HEAD
Skipping 9 packages not available: Biobase, pcaMethods, siggenes, MSnbase, impute, fgsea, edgeR, BiocParallel, RBGL
── R CMD build ──────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/1s/_80kp1nx459_8vt9yyhkdh2m0000gn/T/Rtmph8Yx2m/remotes1da415c2fa54/xia-lab-MetaboAnalystR-ca5acc9/DESCRIPTION’ ...
─  preparing ‘MetaboAnalystR’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘MetaboAnalystR_3.3.0.tar.gz’
   
* installing *source* package ‘MetaboAnalystR’ ...
** using staged installation
** libs
rm -f fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o c/mzROI.o c/xcms_binners.o 
/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c fortran/decorana.f -o fortran/decorana.o
make: /opt/R/arm64/bin/gfortran: No such file or directory
make: *** [fortran/decorana.o] Error 1
ERROR: compilation failed for package ‘MetaboAnalystR’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/MetaboAnalystR’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/1s/_80kp1nx459_8vt9yyhkdh2m0000gn/T//Rtmph8Yx2m/file1da41c3aeab8/MetaboAnalystR_3.3.0.tar.gz’ had non-zero exit status

Please see above! have confirmed that I am using an M1 MacOS chip and R 4.2.3 [arm], GNU-fortran 12.0 universal.

Thanks!

The issue is that you either don’t have gfortran installed, or the R package is looking for it in the wrong place. You may have more luck searching this general problem (R package can’t find gfortran) on other forums like StackOverflow/Bioconductor.

Unfortunately local installation issues are usually system-specific and its very difficult for us to perform remote diagnostics, so we don’t support. Maybe someone else on the forum had and solved this issue in the past and can chime in?

@lliligabriel did you figure this out? I encountered a similar problem and after searching online for a solution I remain stumped.