First I reinstalled RStudio into the latest version (1.1.442) and, following many tips, also the R-base * system (moving to R 3.4.3) using aptitude as follows:
sudo aptitude reinstall libpangocairo-1.0-0 libpango-1.0-0 sudo aptitude reinstall r-base r-base-core r-base-dev
I used aptitude because it is usually better than apt-get to unravel complex dependency trees. Subsequently, when the package was not loaded into the environment, it worked fine, but any package loading created a number of DLL-related errors as follows.
FINAL DECISION (DO NOT REINSTALL):
The error showed up again as soon as I downloaded my homemade library. The real problem is the number of open dlls. If you download too many packages or files, you will get a limit and you will get error messages between maximal number of DLLs reached... or failed to load cairo DLL (this is an error warning) or even lapack routines cannot be loaded . I had these three errors randomly when I downloaded my full dependencies - a makeshift library.
So, I started looking for a solution again. The ultimate goal is to provide more DLLs and do it enough to set the R_MAX_NUM_DLLS environment R_MAX_NUM_DLLS to a larger number (I set it to 500). To avoid problems with setting it up every time you can read the ?Startup documentation and therefore write R_MAX_NUM_DLLS=500 in the Renviron R-HOME/etc/Renviron.site . In my case (Ubuntu: 16.04 it was /usr/lib/R/etc/Renviron.site . This fixed the problem.
source share