I am getting the following error message when trying to install packages since updating to R 4.2.2:
> install.packages("dplyr")
Warning in install.packages :
unable to access index for repository http://cran.csiro.au/src/contrib:
cannot open URL 'http://cran.csiro.au/src/contrib/PACKAGES'
I have seen this is a reasonably common problem and have tried the common solutions being shared, including trying different CRAN mirrors and unticking the "Use secure download method for HTTP" option. This is a work computer, so I am aware that company firewalls can potentially block repository access. However, I have had IT allow the repository URLs to bypass our firewall and check the firewall logs, which has shown no issues.
Any other solutions for this issue would be greatly appreciated. Thanks in advance!
Related
I have a problem with a custom local CRAN-mirror (jfrog) under windows on a machine without access to the internet:
in R 4.1.2, I have no problems accessing the mirror via https,
in R 4.2.0, I get errors that the index in PACKAGES can not be accessed via https.
After browsing the web and SO, I saw some more problems alike but none quite the same (see, e.g. here), I got around this issue by adding to my .Rprofile
options(repos = c(CRAN = "internalrepo"),
download.file.method = "curl",
download.file.extra = "-k -L")
to bypass checking SSL-certificates.
This works for me on a computer with access to the local network only, but it seems a bad idea on computers connected to the internet using a custom CRAN mirror.
Also, I would like to understand the cause of the problem. Did something change in the way that R handles SSL-certificates or did we break something in the installation of R 4.2?
sessionInfo() and Sys.getenv() do not show much difference between R 4.1.2 and R 4.2.0 but in R 4.2.0, I saw that there is an additional environment variable
CURL_CA_BUNDLE that points to the R installation directory /etc/curl-ca-bundle.crt
EDIT: 2022-12-14: I believe I tracked down the issue - it's SSL revocation checks that failed when a system only has access to a local network. A new flag was added to 4.2.1+ that can be set to TRUE, allowing SSL revocation checks to be given 'best-effort' attempts to contact, then bypassed. https://bugs.r-project.org/show_bug.cgi?id=18379 But if a machine has internet access, revocation checks will still be allowed to occur, which, I think, is probably the best we can hope for.
ORIGINAL: Just letting you know #clemenskuehn we have the same thing - local mirror working fine in 4.1.2 over HTTPS on some restricted data systems that aren't allowed internet access, then suddenly we update to 4.2.1 on our windows & linux boxes, and the windows machines only (linux works fine) aren't able to use the local mirror anymore,
"warning: unable to access index for repository https://mirror.oursite.com/cran/src/contrib:
cannot open URL 'https://mirror.oursite.com/cran/src/contrib/PACKAGES"
so it's not just you. Did you open a tracker with the R developers? Your workaround works for us so we might put it into production as a stopgap but it definitely be good if we didn't have to allow insecure connections, even though these systems can't get outbound access anyway.
I've just joined a new office and their security is very tight. Essentially, we cannot go online without connecting to another machine. This means any applications that attempt to connect online won't connect to anything.
I'm trying to set up atom for python development (I've not used atom before and it's all that available to me!) - but the lack of internet is causing an issue.
I understand that to install a package, I can download it from github, and extract it to ~/.atom/packages - and this works! But what do I do with packages with dependencies that haven't been downloaded? Is there a simple way to get the package and the dependency whilst being offline?
I've also noticed that although my office has atom installed there's no 'apm' or 'npm' commands in the terminal...is this common?
thanks
I am facing the below Issue while installing the packages in Rstudio
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
So the problem is with the URL. Note that if you check the PACKAGES URL that it’s failing to access, This problem is often the result of proxies, firewalls, or other traffic filtering software blocking R from accessing remote URL
Try disabling your firewall/anti-virus
Giving R studio access to the firewall etc.
Have a look at the link below. Multiple, possible solutions are provided to the above described problem.
https://support.rstudio.com/hc/en-us/articles/206827897
I am getting this classic error in R
unable to move temporary installation ‘\zrheaf00\users$\807140\R\win-library\3.5\file26bc1bee38f9\fields’ to ‘\zrheaf00\users$\807140\R\win-library\3.5\fields’
in previous versions it was possible to fix by
Trace(utils:::unpackPkgZip, edit=TRUE)
Nevertheless this version does not have the sys.time option. Is there any solution for 3.5?
I think the culprit maybe your antivirus software/app. I disabled mine and the error message disappeared.
This problem exists in R 3.5 on network folders in Windows 10, and the sys.sleep solution is no longer relevant unfortunately. I have full read/write permissions on the network drive where R install libraries, but still receive this error. I do not have admin rights for the machine and therefore cannot switch off anti-virus software.
When I try to install a package in R on macOS I get the following error, both using the GUI menu or install.packages:
Warning: unable to access index for repository https://cran.uni-muenster.de/bin/macosx/el-capitan/contrib/3.5:
cannot open URL 'https://cran.uni-muenster.de/bin/macosx/el-capitan/contrib/3.5/PACKAGES'
There are many Q&A on this site relating to this issue, and none of the answers provided there worked for me.
I tried disabling my firewall, changed all possible settings in the R preferences, checked in my browser whether the packet was online and available (it was), used different options and mirrors, both http and https, in install_packages, to no avail.
If you use Little Snitch, check the rules.
I use Little Snitch in quiet mode and have never defined any rules, and yet Little Snitch had a rule that blocked R from accessing the internet. Maybe Little Snitch installs with a certain set of base rules or creates rules for certain types of software by default. My bit torrent client (qbittorrent) and Cisco's VPN client, which I use to access my university network from home, were both blocked out of the box as well.
I deleted that rule and now packet installation works fine.