Unable to install packages in Rstudio



Error Information:Warning in install.packages :

unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'

Description of issue - Trying to install "ggplot2" package

Steps taken so far - Proxy settings changes in Tools tab
Antivirus disabled
Tried Referencing directly to the directory

System Information:

  • RStudio Edition: (Desktop or Server)
  • RStudio Version: 3.5.2
  • OS Version: Windows7
  • R Version:


If your internet connection is behind a proxy server, then you have to configure your proxy settings with httr before using install.packages()

  use_proxy(url="your.proxy.ip", port="port", username="user",password="password")