error while loading shared libraries: libR.so

I would try compiling R from source, with ./configure --enable-R-shlib, I have never used RHEL based Linux distributions but in case it helps, these would be the steps for Debian based OS'.

sudo apt-get install -y gfortran libreadline6-dev libx11-dev libxt-dev \
                               libpng-dev libjpeg-dev libcairo2-dev xvfb \
                               libbz2-dev libzstd-dev liblzma-dev \
                               libcurl4-openssl-dev \
                               texinfo texlive texlive-fonts-extra \
                               screen wget libpcre2-dev
cd /usr/local/src
sudo wget https://cran.rstudio.com/src/base/R-4/R-4.0.5.tar.gz
sudo su
tar zxvf R-4.0.3.tar.gz
cd R-4.0.5
./configure --enable-R-shlib #--with-blas --with-lapack
make
make install
cd ..
rm -rf R-4.0.5*
exit
cd