Hi @shivak3 ,
thanks for your feedback - glad the precompiled stuff works well for you, too. There is a reason why we offer those, i.e. to get users started with an R installation that has a certain set of essential features that meets the expectations of most users.
If you're building R from source on your own, you really need to follow along the output of the configure command. i.e. if it cannot produce png() output, you will probably see messages like "cannot find png.h" and then you have to find the respective RPM that provides png.h (libpng-devel). It is going to be a very cumbersome process to be honest if you're only starting with building software. One way to tackle is to use the example of the precompiled RPM and run
rpm -qp R-4.1-1-1.x86_64.rpm --requires
which tells you which RPM's are dependencies of R - you then can test each to see if there is a "-devel" package available and install that (e.g. libtiff ==> libtiff-devel).
I would suggest the following way out here (not ideal, but reasonably low-risk): Use the pre-compiled R versions only, e.g. install R 4.1.0 - you then can work with your user to reconfigure his environment to point to the pre-compiled R 4.1.0 binaries and then automatically use the precompiled R packages your user has installed with it.
The best and cleanest way still would be to start with a clean sheet and use the precompiled version, work with the user to reinstall his/her packages and consider this as "lessons learnt".