Running R 4.0.5 on a Linux command line (RedHat Centos 7) and unable to install any packages. Checked for internet connectivity and it passed the test. Switched between CRAN mirrors using chooseCRANmirror() and didn't help.
This is very like a connectivity issue, R is not being able to connect to the CRAN repository you have selected.
Try disabling the secure download setting.
If that doesn't work, 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.
I have already disabled the secure download setting. I am using R at work and there has been no change in traffic restrictions according to our IT. The issue just suddenly happened while everything was fine the day before.
Well, I can access the CRAN repository so servers are working, the connection issue must be on your side, if there are no network changes at your workplace then maybe it is an issue with your internet provider. Either way, I would insist with your IT department to check on this.
Maybe you have a startup file that changes your network configuration in some way that is no longer valid (proxy server credentials maybe)? That is the only thing it comes to my mind.
Would you be able to walk me through that please? I searched for it but I have lack of knowledge to work with those files and didn't understand much about it. Really appreciate it.
If you had modified any Rprofile.site or .Rprofile file, I would expect you to be aware of the location of those files, in other words, if you had change them, you would know it, so it is unlikely to be the cause.
I have heard that RedHat based Linux distributions have very restrictive firewall rules that requires you to "white list" any software you want to be able to connect to the internet instead of only blocking specific ones but I'm not sure of that since I have never use it myself. Sorry I can't be of more help but I'm out of ideas about what might be your problem.