installing packages in Rstudio on Ubuntu Linux

This could possibly be involved. What do you get when you run getOption("repos")? Do you have a .Rprofile file in your current working directory or your home directory? This is typically where that would be set. See this other thread for advice on how to change your default CRAN mirror URL.