我无法使用blogdown软件包安装hugo。当我运行blogdown::hugo_install()时,我收到以下消息,并看到一个弹出窗口,其中包含雨果正在下载的消息。弹出窗口出现后,R/ RStudio只是挂起。作为参考,我刚刚更新了R,我的RStudio版本是1.2.5033。我正在运行Windows 10。
The latest Hugo version is 0.69.0 trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_extended_0.69.0_Windows-64bit.zipContent length 649 bytes我还尝试运行blogdown:hugo_install(version = 0.69)。当我运行它时,我会得到一个不同的错误:
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.69/hugo_extended_0.69_Windows-64bit.zip'
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.69/hugo_extended_0.69_Windows-64bit.zip'
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.69/hugo_extended_0.69_Windows-64bit.zip'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9 100 9 0 0 9 0 0:00:01 --:--:-- 0:00:01 44
Error in install_hugo_bin(exec) :
Unable to install Hugo to any of these dirs: C:\Users\dougj\AppData\Roaming/Hugo,
In addition: Warning messages:
1: In download.file(url, output, ..., method = method) :
cannot open URL 'https://github.com/gohugoio/hugo/releases/download/v0.69/hugo_extended_0.69_Windows-64bit.zip': HTTP status was '404 Not Found'
2: In download.file(url, output, ..., method = method) :
cannot open URL 'https://github.com/gohugoio/hugo/releases/download/v0.69/hugo_extended_0.69_Windows-64bit.zip': HTTP status was '404 Not Found'
3: In download.file(url, output, ..., method = method) :
cannot open URL 'https://github.com/gohugoio/hugo/releases/download/v0.69/hugo_extended_0.69_Windows-64bit.zip': HTTP status was '404 Not Found'
4: In utils::unzip(zipfile) : error 1 in extracting from zip file
5: In file.copy(exec, destdir, overwrite = TRUE) :
problem copying .\hugo.exe to C:\Users\dougj\AppData\Roaming\Hugo\hugo.exe: No such file or directory最后,我尝试安装blogdown的dev版本,下载hugo二进制文件,然后使用blogdown::hugo_install_bin(path_to_unzipped_binary.exe)手动安装,但是当我尝试这样做时,我得到了这个错误:
Error: 'install_hugo_bin' is not an exported object from 'namespace:blogdown'有什么建议吗?
发布于 2020-04-20 15:22:29
The latest Hugo version is 0.69.0
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_extended_0.69.0_Windows-64bit.zip'
Content length 649 bytes根据上面的消息,内容长度似乎不正确(应该是13Mb)。我不知道为什么,但你可能在防火墙后面。如果是这样,您可以在web浏览器中下载这个zip文件,并将压缩文件的本地文件路径传递给blogdown::install_hugo(),例如,
# change the path below to the actual path of the zip file on your computer
blogdown::install_hugo('~/Downloads/hugo_extended_0.69.0_Windows-64bit.zip')剩下的问题是:
我还尝试运行blogdown:hugo_install(version = 0.69)。当我运行时,我会得到一个不同的错误。
这是因为没有0.69版本。只有0.69.0 (您可以在Github发布页面上检查它)。
最后,我尝试安装blogdown的dev版本,下载hugo二进制文件,然后使用blogdown::hugo_install_bin(path_to_unzipped_binary.exe)手动安装。
函数hugo_install_bin()不是从blogdown导出的。您并不真正需要它(使用install_hugo()代替)。
https://stackoverflow.com/questions/61317355
复制相似问题