Solving the problem of "Problem with the SSL CA cert (path? access rights?)" for R server on HDInsight

R Server on HDInsight is an ideal platform for performing big data analysis using R interface. If you install packages just from the CRAN R repository, you probably won't meet the problem mentioned in the title. However, if you want to install some package that is still under development, or if you want to use devtools package in general, you might encounter this problem:

 > devtools::install_github('apache/spark@v2.1.0', subdir='R/pkg')
Error in curl::curl_fetch_disk(url, x$path, handle = handle) : 
  Problem with the SSL CA cert (path? access rights?)

To solve this problem, it is actually quite easy:

  1. install the curl and httr package:

     install.packages(c("curl", "httr"))
    
  2. restart the R console

Now this problem should be solved.

Happy coding!