无法理解来自 blogdown 的错误信息

Can't understand the error message from blogdown

我正在尝试使用我的 windows 机器用 blogdown 创建博客,但是当我使用 RStudio 时收到此错误消息 (File/New Project/New Directory/Website 使用 blogdown/ ... 并输入目录名称:"new"):

 setwd("C:/Users/AndrésLagerlöf/OneDrive - Andrés Lagerlöf Konsulttjänst AB/R/blog")
'C:\Users\Andr‚sLagerl”f\AppData\Roaming\Hugo\hugo.exe" new site "new' is not recognized as an internal or external command,
operable program or batch file.
Error in shell(cmd, mustWork = TRUE, intern = intern) : 
  '"C:\Users\AndrésLagerlöf\AppData\Roaming\Hugo\hugo.exe" new site "new" --force -f toml' execution failed with error code 1

我不知道如何理解这条错误消息。有谁知道如何解决这个问题?

我使用 R 版本 4.0.0 和 RStudio 版本 1.2.5033。

亲切的问候, 安德烈斯

您可以考虑将 Hugo 安装到不包含多字节字符的路径。根据文档 ?blogdown::install_hugo:

If you want to install Hugo to a custom path, you can set the global option blogdown.hugo.dir to a directory to store the Hugo executable before you call install_hugo(), e.g., options(blogdown.hugo.dir = '~/Downloads/hugo_0.20.1/').

这在Appendix D.1 in the blogdown book. You'd better set this option in your .Rprofile (see Section 1.4中也有提到如何),所以重启R后设置不会丢失。