rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 334 forks source link

Hugo extended download site seems down #727

Closed tianfeiwei closed 2 years ago

tianfeiwei commented 2 years ago

Dear Yihui, the Hugo extended site seems down (404), which is causing trouble to execute install_hugo command:

The latest Hugo version is v0.102.2
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.102.2/hugo_extended_0.102.2_macOS-64bit.tar.gz'
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.102.2/hugo_extended_0.102.2_macOS-64bit.tar.gz'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
Error in xfun::download_file(paste0(base, zipfile), zipfile, mode = "wb",  : 
  Failed to download hugo_extended_0.102.2_macOS-64bit.tar.gz from https://github.com/gohugoio/hugo/releases/tag/v0.102.2. Please check blogdown::hugo_installers("0.102.2") for available Hugo installers.

Checklist

When filing a bug report, please check the boxes below to confirm that you have provided us with the information we need. Have you:

> xfun::session_info('blogdown')
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.5.1, RStudio 2022.7.1.554

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  base64enc_0.1.3  blogdown_1.11    bookdown_0.28.2  bslib_0.4.0      cachem_1.0.6     digest_0.6.29    evaluate_0.16    fastmap_1.1.0    fs_1.5.2        
  glue_1.6.2       graphics_4.2.1   grDevices_4.2.1  highr_0.9        htmltools_0.5.3  httpuv_1.6.5     jquerylib_0.1.4  jsonlite_1.8.0   knitr_1.40      
  later_1.3.0      magrittr_2.0.3   memoise_2.0.1    methods_4.2.1    mime_0.12        promises_1.2.0.1 R6_2.5.1         rappdirs_0.3.3   Rcpp_1.0.9      
  rlang_1.0.5      rmarkdown_2.16   sass_0.4.2       servr_0.24       stats_4.2.1      stringi_1.7.8    stringr_1.4.1    tinytex_0.41     tools_4.2.1     
  utils_4.2.1      xfun_0.32        yaml_2.3.5  
cderv commented 2 years ago

@yihui It seems it has changed name to https://github.com/gohugoio/hugo/releases/tag/v0.102.2: https://github.com/gohugoio/hugo/releases/tag/v0.102.2

yihui commented 2 years ago

I see. They no longer provide different binaries for different architectures, but only a single hugo_extended_VERSION_macOS-universal.tar.gz. This change was introduced in v0.102.0 released 4 days ago.

I'll fix it today. Thanks for the report!

yihui commented 2 years ago

Actually you can also use blogdown::install_hugo(arch = 'universal'), but I'll fix it anyway.

yihui commented 2 years ago

Should be fixed now. You can either use the method I mentioned above, or install the development version via

remotes::install_github('rstudio/blogdown')
NatWu commented 2 years ago

Hi Yihui, Thank you for making and keep maintaining this package! I had trouble installing the Hugo and found your fixed solution. But there seems to be an update on the source code from the Hugo release yesterday, maybe that's causing additional errors after your previous fix. Here are the list of things I have tried and using the arch = 'amd64' seems to work for me so far. I just wanted to share my learning here in case others run into the same issue and made the error visible to you so maybe you could update the package as you see fit. Thank you!

blogdown::install_hugo(arch = 'universal') no longer works as there's no such file exist anymore. I tried

> blogdown::install_hugo(arch = 'universal')
The latest Hugo version is v0.103.0
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_0.103.0_Windows-universal.zip'
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_0.103.0_Windows-universal.zip'
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_0.103.0_Windows-universal.zip'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
Error in xfun::download_file(paste0(base, zipfile), zipfile, mode = "wb",  : 
  Failed to download hugo_0.103.0_Windows-universal.zip from https://github.com/gohugoio/hugo/releases/tag/v0.103.0. Please check blogdown::hugo_installers("0.103.0") for available Hugo installers, and use the appropriate os/arch/extended arguments for blogdown::install_hugo().

blogdown::install_hugo(arch = 'amd64') and it worked. Not sure if this is what I needed to run on a Windows, but this is the only way I can install Hugo now.

> blogdown::install_hugo(arch = 'amd64')
The latest Hugo version is v0.103.0
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_0.103.0_Windows-amd64.zip'
Content type 'application/octet-stream' length 17278868 bytes (16.5 MB)
downloaded 16.5 MB

I also tried remotes::install_github('rstudio/blogdown') and still got error on installing Hugo.

> install_hugo()
The latest Hugo version is v0.103.0
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_Windows-64bit.zip'
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_Windows-64bit.zip'
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_Windows-64bit.zip'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
Error in xfun::download_file(paste0(base, zipfile), zipfile, mode = "wb",  : 
  Failed to download hugo_extended_0.103.0_Windows-64bit.zip from https://github.com/gohugoio/hugo/releases/tag/v0.103.0. Please check blogdown::hugo_installers("0.103.0") for available Hugo installers, and use the appropriate os/arch/extended arguments for blogdown::install_hugo().
yihui commented 2 years ago

@NatWu Thanks for the report! Please see #729, which I have fixed a few hours ago.

BTW, the error message says:

Please check blogdown::hugo_installers("0.103.0") for available Hugo installers, and use the appropriate os/arch/extended arguments for blogdown::install_hugo()

If you do that, you will see arch = 'universal' is not a possible value for windows.

> blogdown::hugo_installers("0.103.0")
                                              version        os      arch extended
hugo_0.103.0_darwin-universal.tar.gz          0.103.0    darwin universal    FALSE
hugo_0.103.0_dragonfly-amd64.tar.gz           0.103.0 dragonfly     amd64    FALSE
hugo_0.103.0_freebsd-amd64.tar.gz             0.103.0   freebsd     amd64    FALSE
hugo_0.103.0_Linux-64bit.tar.gz               0.103.0     Linux     64bit    FALSE
hugo_0.103.0_linux-amd64.tar.gz               0.103.0     linux     amd64    FALSE
hugo_0.103.0_linux-arm.tar.gz                 0.103.0     linux       arm    FALSE
hugo_0.103.0_linux-arm64.tar.gz               0.103.0     linux     arm64    FALSE
hugo_0.103.0_netbsd-amd64.tar.gz              0.103.0    netbsd     amd64    FALSE
hugo_0.103.0_openbsd-amd64.tar.gz             0.103.0   openbsd     amd64    FALSE
hugo_0.103.0_windows-amd64.zip                0.103.0   windows     amd64    FALSE
hugo_0.103.0_windows-arm64.zip                0.103.0   windows     arm64    FALSE
hugo_extended_0.103.0_darwin-universal.tar.gz 0.103.0    darwin universal     TRUE
hugo_extended_0.103.0_Linux-64bit.tar.gz      0.103.0     Linux     64bit     TRUE
hugo_extended_0.103.0_linux-amd64.tar.gz      0.103.0     linux     amd64     TRUE
hugo_extended_0.103.0_linux-arm64.tar.gz      0.103.0     linux     arm64     TRUE
hugo_extended_0.103.0_windows-amd64.zip       0.103.0   windows     amd64     TRUE
NatWu commented 2 years ago

@yihui Thank you for the quick fix and the recommendation on error message handling!

@NatWu Thanks for the report! Please see #729, which I have fixed a few hours ago.

BTW, the error message says:

Please check blogdown::hugo_installers("0.103.0") for available Hugo installers, and use the appropriate os/arch/extended arguments for blogdown::install_hugo()

If you do that, you will see arch = 'universal' is not a possible value for windows.

> blogdown::hugo_installers("0.103.0")
                                              version        os      arch extended
hugo_0.103.0_darwin-universal.tar.gz          0.103.0    darwin universal    FALSE
hugo_0.103.0_dragonfly-amd64.tar.gz           0.103.0 dragonfly     amd64    FALSE
hugo_0.103.0_freebsd-amd64.tar.gz             0.103.0   freebsd     amd64    FALSE
hugo_0.103.0_Linux-64bit.tar.gz               0.103.0     Linux     64bit    FALSE
hugo_0.103.0_linux-amd64.tar.gz               0.103.0     linux     amd64    FALSE
hugo_0.103.0_linux-arm.tar.gz                 0.103.0     linux       arm    FALSE
hugo_0.103.0_linux-arm64.tar.gz               0.103.0     linux     arm64    FALSE
hugo_0.103.0_netbsd-amd64.tar.gz              0.103.0    netbsd     amd64    FALSE
hugo_0.103.0_openbsd-amd64.tar.gz             0.103.0   openbsd     amd64    FALSE
hugo_0.103.0_windows-amd64.zip                0.103.0   windows     amd64    FALSE
hugo_0.103.0_windows-arm64.zip                0.103.0   windows     arm64    FALSE
hugo_extended_0.103.0_darwin-universal.tar.gz 0.103.0    darwin universal     TRUE
hugo_extended_0.103.0_Linux-64bit.tar.gz      0.103.0     Linux     64bit     TRUE
hugo_extended_0.103.0_linux-amd64.tar.gz      0.103.0     linux     amd64     TRUE
hugo_extended_0.103.0_linux-arm64.tar.gz      0.103.0     linux     arm64     TRUE
hugo_extended_0.103.0_windows-amd64.zip       0.103.0   windows     amd64     TRUE