Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : cannot open URL #102

Open
maurolepore opened this issue May 23, 2018 · 19 comments
Labels

Comments

@maurolepore
Copy link
Contributor

remotes::install_github("forestgeo/fgeo.habitat")
Downloading GitHub repo forestgeo/fgeo.habitat@master
Error in utils::download.file(url, path, method = download_method(), quiet = quiet,  : 
  cannot open URL 'https://api.github.com/repos/forestgeo/fgeo.habitat/zipball/master'

Might work with devtools intead of remotes (r-lib/remotes#130).

@zqcrystal325
Copy link

Hello, I run my code with devtools, still the error occured, do you know how to solve this? Thank you!
devtools::install_github("xia-lab/MetaboAnalystR")
Downloading GitHub repo xia-lab/MetaboAnalystR@master
Error in utils::download.file(url, path, method = download_method(), quiet = quiet, :
cannot open URL 'https://api.github.com/repos/xia-lab/MetaboAnalystR/tarball/master'

@maurolepore
Copy link
Contributor Author

@zqcrystal325, have you tried updating R and all packages?

@zqcrystal325
Copy link

Yes, I already updated my R and packages.

@maurolepore
Copy link
Contributor Author

👍
Unfortunately I won't be able to help. I suggest you follow up at r-lib/remotes#130 or ask in this friendly forum: https://community.rstudio.com/

@zqcrystal325
Copy link

Thank you for trying to help. I appreciate!

@ShaowenJ
Copy link

Sorry, anybody solves this question, I also came across the same problem recently. Looking for help.

@ShaowenJ
Copy link

I found this solution works for me. Maybe because weird thing in Windows.
r-lib/remotes#130 (comment)

@Masutani
Copy link

for me this worked on Windows 10

options(download.file.method = "wininet")

https://support.rstudio.com/hc/en-us/articles/206827897-Secure-Package-Downloads-for-R

@corwms
Copy link

corwms commented Jan 29, 2020

On Windows 10, wininet didn't fix but tried this and it worked:

options(download.file.method = "libcurl")

@zhengchx
Copy link

error: Failed to install 'unknown package' from GitHub:
schannel: failed to receive handshake, SSL/TLS connection failed

library(LCTpackage)
Error in library(LCTpackage) : don't esist the package name of ‘LCTpackage’
help!how can I solve the question?
below is my code
library(devtools)
install_github("MattisvdBergh/LCT")
library(LCTpackage)

@cczxsong
Copy link

cczxsong commented Dec 2, 2020

for me this worked on Windows 10

options(download.file.method = "wininet")

https://support.rstudio.com/hc/en-us/articles/206827897-Secure-Package-Downloads-for-R

thanks,I worked!

@JXXCgit
Copy link

JXXCgit commented Apr 27, 2021

for me this worked on Windows 10

options(download.file.method = "wininet")

https://support.rstudio.com/hc/en-us/articles/206827897-Secure-Package-Downloads-for-R

this works!
Thank you

@rafalopespx
Copy link

For me on Windows 10 the wininet worked!

@ItsOyondi
Copy link

for me this worked on Windows 10
options(download.file.method = "wininet")
https://support.rstudio.com/hc/en-us/articles/206827897-Secure-Package-Downloads-for-R

this works! Thank you

This worked for me. Windows 11

@Kheir2022
Copy link

for me this worked on Windows 10

options(download.file.method = "wininet")

https://support.rstudio.com/hc/en-us/articles/206827897-Secure-Package-Downloads-for-R

Thanks this works well

@SongbiaoZhu
Copy link

for me this worked on Windows 11
options(download.file.method = "wininet")
Thanks!

@d2gex
Copy link

d2gex commented Aug 10, 2023

Looking for solutions to my problem, given that the error just showed "failed" I landed here. Looking at the documentation of R's utils I realised that the default timeout was too short (60 seconds) for the repo I was trying to install. Without changing the download method, I just increased the timeout option as follows:

options(timeout = max(300, getOption("timeout")))

Basically the error is very little informative. There should be, in my case at least, a timeout mention.

@sihaotchen
Copy link

as a note, I tried options(timeout = 600000000) ### set this to avoid timeout error
this works

@sjkiss
Copy link

sjkiss commented Jul 9, 2024

I am having this problem on Mac OS 14.5 RStudio 2024.04.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests