install.packages unable to access index for repository: Try disabling “secure download method for HTTP”

Hello everyone,
I recently found a topic on the problem related to the installation of packages from the cran repository.

install.packages("devtools")
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Installing package into ‘C:/Users/inspirion 14a2/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘devtools’ is not available (for R version 3.4.0)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/3.4:
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/PACKAGES'

They propose several solutions:https://forum.posit.co/t/package-dplyr-is-not-available-for-r-version-3-4-3/13911/7
However, none of them worked for me.
Finally, I was able to solve it, in my case the problem was that in
the configuration was checked the option: Global option -> Packages->Use secure download method for HTTP.
You just have to uncheck it


Excuse the English,
I hope you find it useful
Greetings

Hola a todos, hace poco encontre un topic sobre el problema relacionado a la instalacion de los paquetes desde el repositorio del cran.
Proponian varias soluciones:
Sin embargo ninguna me funcionó.
Finalmente pude resolverlo, en mi caso el problema estaba en que en
la configuracion estaba tildada la opcion:

Solo hay que destildarla

Disculpen el ingles,
Espero les sea util
Saludos

24 Likes

Thank you so much! Wasted a long time on this issue, grateful to have come across this!

3 Likes

Thanks a lot. Finally the issue is resolved. Wasted 3 days on this.

2 Likes

Helped me out too! Legend!

2 Likes

Thank you! Your experience was very useful!

2 Likes