I'm running R 4.1.0 GUI 1.76 High Sierra build (7976) on a macOS Big Sur version 11.4. I need to install the package glmnet and I'm using the command on the console:
install.packages("glmnet")
I tried also:
install.packages("glmnet", dependencies = TRUE)
But both of them give me the same error as output:
During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_TIME failed, using "C" 3: Setting LC_MESSAGES failed, using "C" 4: Setting LC_MONETARY failed, using "C"
- installing source package 'glmnet' ... ** package 'glmnet' 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 glmnet5dpclean.f -o glmnet5dpclean.o make: gfortran: Bad CPU type in executable make: *** [glmnet5dpclean.o] Error 1 ERROR: compilation failed for package 'glmnet'
- removing '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/glmnet'
The downloaded source packages are in '/private/var/folders/xl/dk1600ms2mj3myv7rwtkzmb40000gn/T/RtmpO7TLXK/downloaded_packages' Warning message: In install.packages("glmnet") : installation of package 'glmnet' had non-zero exit status
I tried also the code:
curl -O http://mac.R-project.org/libs-arm64/pkgconfig-0.28-darwin.20-arm64.tar.gz sudo tar fvxz pkgconfig-0.28-darwin.20-arm64.tar.gz -C /
But it didn't work.
Does anyone have an idea to help me on installing this package?
Thank you very much! Kind regards,
Rafael