简体   繁体   English

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

[英]Can't understand the error message from blogdown

I am trying to make a blog with blogdown using my windows machine, but get this error message when I use RStudio (File/New Project/New Directory/Website using blogdown/... and enter Directory name: "new"):我正在尝试使用我的 windows 机器创建一个带有blogdown的博客,但是当我使用 RStudio 时收到此错误消息(文件/新项目/新目录/网站使用 blogdown/... 并输入目录名称:“新”):

 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

I do not know what to make out of this error message.我不知道该错误消息是什么意思。 Does anyone know how to fix this?有谁知道如何解决这一问题?

I use R version 4.0.0 and RStudio Version 1.2.5033.我使用 R 版本 4.0.0 和 RStudio 版本 1.2.5033。

Kind regards, Andrés亲切的问候,安德烈斯

You may consider installing Hugo to a path that does not contain multibyte characters.您可以考虑将 Hugo 安装到不包含多字节字符的路径。 Per documentation ?blogdown::install_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() , eg, options(blogdown.hugo.dir = '~/Downloads/hugo_0.20.1/') .如果要安装 Hugo 到自定义路径,可以在调用install_hugo()之前将全局选项blogdown.hugo.dir设置为存储 Hugo 可执行文件的目录,例如options(blogdown.hugo.dir = '~/Downloads/hugo_0.20.1/')

This is also mentioned in Appendix D.1 in the blogdown book. blogdown书的附录 D.1中也提到了这一点。 You'd better set this option in your .Rprofile (see Section 1.4 for how), so the setting won't be lost after you restart R.你最好在你的.Rprofile中设置这个选项(参见1.4 节),这样在你重启 R 后设置不会丢失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM