Unable to install R packages in Ubuntu 18.04

It seems that to get predictive results you may want to start with renaming your existing R personal library with:

mv /home/$USER/R /home/$USER/R_old

Also install development package of curl:

sudo apt-get install libcurl4-openssl-dev

And then try to install your R-package from R-terminal:

$ R
install.packages("forecast")

My resolution came from the Rstudio boards: https://community.rstudio.com/t/error-version-curl-openssl-3-not-found/8090

Simply removing the R curl package and reinstalling (along with devtools etc.) did the trick.