Can't install "psych" dependencies "mnormt"

I can't load "psyc" on freshly installed Rstduio. Xcode tools are present. Tried mirror repo to no avail.Any help will be appreciated. here is what i get:

> install.packages("psych")
also installing the dependency ‘mnormt’

  There is a binary version available but the source version is later:
       binary source needs_compilation
mnormt  1.5-7  2.0.0              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) y
trying URL ''
Content type 'application/octet-stream' length 3786330 bytes (3.6 MB)
downloaded 3.6 MB

The downloaded binary packages are in
installing the source package ‘mnormt’

trying URL ''
Content type 'application/octet-stream' length 48856 bytes (47 KB)
downloaded 47 KB

* installing *source* package ‘mnormt’ ...
** package ‘mnormt’ 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 biv-nt.f -o biv-nt.o
make: gfortran: No such file or directory
make: *** [biv-nt.o] Error 1
ERROR: compilation failed for package ‘mnormt’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/mnormt’
Warning in install.packages :
  installation of package ‘mnormt’ had non-zero exit status

The downloaded source packages are in
1 Like

The underlying issue seems that you don't have gfortran installed on your machine.

It seems the CRAN page at has some hints on how to do that.

1 Like

I had the same problem. Upgraded to R version 4.0.1 and continued to have the same problem. Below is what I did and it seems to work now:

For the question "Do you want to install from sources ... that needs compilation", answer "no", then it appears as though it would install.

I also used "install.packages(“mnormt")" first. And after it is installed, I used "install.pakcages("psych")"

Good luck. Hope it helps.


Thank u Andrie. I had figured that out a bit later. I had to install the latest version of gfortran for Mac. Thank you so much for ur prompt help. HB

Thank u Eva. I tried that too but it didn’t work. Gfortran was missing so after a bit of fiddling around. I figured it out. I installed a fresh version of gfortran for Mac and it worked like a charm. I’m a newbie but I’m getting sucked in. All the best

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