R libraries cannot be installed

68 views Asked by At

I have a new computer in the same network as the old one. In the new one, I first installed RStudio, then the latest version of R (I hope the order does not matter). Now, the new R installation gets "unable to access index for repository" error for every library. Simple task becomes hours of googling, during which I tried the following:

  1. tick or untick use secure download method for http in global options (was ticked in the old computer)
  2. try different, close my location repositories in global settings
  3. copy the folder of an existing package (like ggplot2) from the old computer to the new one's library folder (does not become visible in packages pane)
  4. uninstall and reinstall R
  5. compare installations (the only difference is that in the old computer, folder RTools is under c:/program files while in the new one I accepted the standard location and folder (c:/Rtools40)

Please note that both computers are in the same corporate network, so the firewall and other network settings are the same.

1

There are 1 answers

1
Peter On

Finally I found the reason: our company uses an internal repository that mirrors an external one. After inserting a custom repository, everything worked perfectly.

I hope this helps if someone runs to a similar problem.

Thanks everyone for your comments!