Package installation under ver 4.0.3 on arch linux

Hi all. I am using R version 4.0.3 under arch linux. Installing packages psych, lavaan, mnormt, bayes4psy yields
installation of package ‘bayes4psy’ (etc) had non-zero exit status. I then downloaded these from cran and saved these on a folder ~/crans. I then try to install from with in R but to no avail. I installed shiny from the package installer and it worked. I then removed shiny, then downloaded it from CRAN into the said folder and then installed it. shiny worked well
Please help me with 1) installation of these packages or 2) recommend other packages that install under 4.0.3 which are functionally equivalent.
regards. drjam

Can you please include the full error messages you are getting?

make: gfortran: No such file or directory
make: *** [/usr/lib64/R/etc/Makeconf:200: tmvnghk.o] Error 127
ERROR: compilation failed for package ‘tmvnsim’

  • removing ‘/home/johan/R/x86_64-pc-linux-gnu-library/4.0/tmvnsim’
    Warning in install.packages :
    installation of package ‘tmvnsim’ had non-zero exit status
    ERROR: dependency ‘tmvnsim’ is not available for package ‘mnormt’
  • removing ‘/home/johan/R/x86_64-pc-linux-gnu-library/4.0/mnormt’
    Warning in install.packages :
    installation of package ‘mnormt’ had non-zero exit status
    ERROR: dependency ‘mnormt’ is not available for package ‘psych’
  • removing ‘/home/johan/R/x86_64-pc-linux-gnu-library/4.0/psych’
    Warning in install.packages :
    installation of package ‘psych’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpPntOMQ/downloaded_packages’

This only part of the printout. since I am a new user,my posting is limited.
Thanks in anticipation.

Hi Everyone,
With my challenge installing packages such as psych and ggplot2 on arcolinux, I

  1. uninstalled version 4.03
  2. opened a terminal
  3. cmd<- yay rstudio
  4. Selected 1-7
    and then installed v 4.03 anew.
    I have now installed psych, ggplot2.
    I do not know what was done wrong,; but R functions good.
    Regards.