0

Why am I getting the following error when I am trying to install 'log4r' package?

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 ‘log4r’ is not available for this version of R

I even tried changing the cran mirror but after some time I encountered an error like below:

Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
  URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'SSL connect error'

I tried the following solutions:

  1. Disabled "use secure download method for http" under packages
  2. Restarted internet
  3. Restarted R session

What else can I do?

Phil
  • 7,287
  • 3
  • 36
  • 66
PikaPika
  • 9
  • 3
  • The URL is accessible for me, so the problem appears to lie with your local set up. HAve you tried opeing the URL in your browser? What happens if you do? If you can open the URL in your browswer, the problem is likely to do with R. if you can't, it's with your internet access. We need more information. – Limey Mar 31 '23 at 12:48
  • I am able to open the URL in my browser – PikaPika Mar 31 '23 at 14:56
  • Are you ignoring this warning: `Warning in install.packages : package ‘log4r’ is not available for this version of R`? – Jacob Bumgarner Mar 31 '23 at 15:45
  • What version of R do you have? – Phil Apr 01 '23 at 01:02
  • Not just this package, it's the same with all packages, which were working fine just 3 days before. R - 4.2.2. I tried changing the cran mirror. Installed another version of R and removed the previous one. Almost tried all the solutions from web apart from uninstalling RStudio. I guess now that's the only option left. Any ideas what went wrong? – PikaPika Apr 03 '23 at 08:47

0 Answers0