Error while installing packages

I have tried most of other CRAN mirrors but still I cannot install any pakage. Can anyone help me out.

Please post the whole error message you are getting, so far you are not providing enough information for us to be able to to help you.

install.packages("readxl")
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib:
cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib:
cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
package ‘readxl’ is not available (for R version 4.0.0)
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/4.0:
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.0/PACKAGES'

Can you manually follow the links on your network ?

This seems like a connectivity issue, R is not being able to connect to the CRAN repository you have selected, these are some things to try.

  • Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/) or you could choose one that is geographically closer to you.
  • Disable secure download setting.
  • Check if your internet connection has traffic restrictions of some kind, like a firewall, proxy server, etc. This is usually the case when you are at work or school.

It didn't help.

I tried other CRAN mirrors too, yet again same thing appars. And I also disabled the secure download option. Still same errors appear

I don't understand what you mean.

Can you browse to the URL http://cran.rstudio.com/src/contrib/PACKAGES ?
In your web browser (not in R) ?

I opened the link, now what?

I also allowed the Rstudio to run through firewall. Nothing seems to solve my problem, I don't know what to do ....

Can you run sessionInfo() and share the result?

I can't even install packages from package archives(.zip ; .tar.gz)... same errors appears when I try to install via this method

no exactly same, but yeah doesn't work

whats the difference ? it may reveal something useful

I can install them, but when I try to load them you can see the error in the screen shot...help me out of this.. I am sick of it.. have been trying to make it work for like 2 weeks now

I installed that tidyverse package via package archive file

I would bet money at this stage that this is firewall related. Can you temporarily completely disable your firewall, just long enough to test install.packages?

Back to square one, still same problem