To give you a sense for what the RStudio Package Manager support @kellobri describes will look like, here is a sneak peek at the in-development version:
This is a screen capture of the httr packages page. Behind the scenes, RStudio Package Manager has identified that httr depends on the curl package, which in turn has a dependency on libssl. We've translated that system requirement into specific install command based on the operating system you select (e.g. for Ubuntu 18.04 you need libcurl4-openssl-dev and libssl-dev, whereas for CentOS 6 you need libcurl-devel and openssl-devel).
Regardless of how you go about getting those dependencies resolved (be it through a nix installation, a Dockerfile modification, or just sending your sys-admin an email with package manager's recommended installation commands), you won't need to google around anymore or debug strange compilation errors.
We'd welcome any feedback on this approach as we wrap up the first pass.