forestgeo / learn

Links to interesting articles, videos, tutorials, tips, and more
5 stars 8 forks source link

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

Open maurolepore opened 6 years ago

maurolepore commented 6 years ago
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 (https://github.com/r-lib/remotes/issues/130).

zqcrystal325 commented 6 years ago

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 commented 6 years ago

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

zqcrystal325 commented 6 years ago

Yes, I already updated my R and packages.

maurolepore commented 6 years ago

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

zqcrystal325 commented 6 years ago

Thank you for trying to help. I appreciate!

ShaowenJ commented 5 years ago

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

ShaowenJ commented 5 years ago

I found this solution works for me. Maybe because weird thing in Windows. https://github.com/r-lib/remotes/issues/130#issuecomment-423830669

Masutani commented 5 years ago

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 commented 4 years ago

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

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

zhengchx commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

For me on Windows 10 the wininet worked!

ItsOyondi commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

d2gex commented 1 year ago

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 commented 11 months ago

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

sjkiss commented 4 months ago

I am having this problem on Mac OS 14.5 RStudio 2024.04.1