blogdown: 'system3' 不是从 'namespace:xfun' 导出的对象
Posted
技术标签:
【中文标题】blogdown: \'system3\' 不是从 \'namespace:xfun\' 导出的对象【英文标题】:blogdown: 'system3' is not an exported object from 'namespace:xfun'blogdown: 'system3' 不是从 'namespace:xfun' 导出的对象 【发布时间】:2022-01-07 20:50:20 【问题描述】:在Windows 10
上,blogdown::new_site()
函数出现以下错误:
Hugo 已安装到“C:\Users\hp\AppData\Roaming\Hugo\0.89.4”。 建议设置选项(blogdown.hugo.version = "0.89.4") 在您网站项目的 .Rprofile 文件中。请参阅 blogdown 书 有关 .Rprofile 的更多信息: https://bookdown.org/yihui/blogdown/global-options.html
错误:“system3”不是从“namespace:xfun”导出的对象
我想知道我在这里缺少什么?任何提示。
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] xfun_0.28
loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2 blogdown_1.6.5 pacman_0.5.1
【问题讨论】:
【参考方案1】:仅供参考,我在尝试遵循 this blog 的 TL;DR 部分时遇到完全相同的错误,那是在显式更新 xfun
包之后。这是我尝试运行的整个代码段:
remotes::install_github("rstudio/blogdown")
usethis::create_project()
blogdown::new_site(theme = "wowchemy/starter-academic")
这是我得到的错误:
09:14:26 > blogdown::new_site(theme = "wowchemy/starter-academic")
― Creating your new site
| Installing Hugo
The latest Hugo version is v0.90.1
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.90.1/hugo_extended_0.90.1_macOS-ARM64.tar.gz'
Content type 'application/octet-stream' length 16102460 bytes (15.4 MB)
==================================================
downloaded 15.4 MB
Hugo has been installed to "/Users/rogerbos/Library/Application Support/Hugo/0.90.1".
Error: 'system3' is not an exported object from 'namespace:xfun'
09:14:26 >
这是我的 sessionInfo():
9:14:26 > sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.0.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] datasets utils stats graphics grDevices methods base
other attached packages:
[1] alphavantager_0.1.2 googlesheets4_1.0.0 googledrive_2.0.0
[4] clipr_0.7.1 jsonlite_1.7.2 stringi_1.7.6
[7] dtplyr_1.1.0 data.table_1.14.2 dplyr_1.0.7
[10] plyr_1.8.6 testthat_3.1.0 lubridate_1.8.0
[13] timeDate_3043.102 sendmailR_1.2-1 rmarkdown_2.11
[16] devtools_2.4.2 usethis_2.1.3 xts_0.12.1
[19] zoo_1.8-9 MASS_7.3-54 fortunes_1.5-4
loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 lattice_0.20-45 prettyunits_1.1.1
[4] ps_1.6.0 assertthat_0.2.1 rprojroot_2.0.2
[7] digest_0.6.29 utf8_1.2.2 R6_2.5.1
[10] cellranger_1.1.0 evaluate_0.14 blogdown_1.6.5
[13] httr_1.4.2 pillar_1.6.4 rlang_0.4.12
[16] curl_4.3.2 rstudioapi_0.13 callr_3.7.0
[19] desc_1.4.0 compiler_4.1.2 xfun_0.28
[22] pkgconfig_2.0.3 askpass_1.1 base64enc_0.1-3
[25] pkgbuild_1.2.0 htmltools_0.5.2 openssl_1.4.5
[28] tidyselect_1.1.1 tibble_3.1.5 bookdown_0.24
[31] fansi_0.5.0 crayon_1.4.2 withr_2.4.2
[34] rappdirs_0.3.3 grid_4.1.2 lifecycle_1.0.1
[37] DBI_1.1.1 magrittr_2.0.1 cli_3.1.0
[40] cachem_1.0.6 fs_1.5.0 remotes_2.4.1
[43] ellipsis_0.3.2 vctrs_0.3.8 generics_0.1.1
[46] tools_4.1.2 glue_1.5.1 purrr_0.3.4
[49] processx_3.5.2 pkgload_1.2.3 fastmap_1.1.0
[52] gargle_1.2.0 sessioninfo_1.2.1 memoise_2.0.0
[55] knitr_1.36
【讨论】:
【参考方案2】:我不知道你是如何在没有同时安装 xfun 开发版的情况下安装 blogdown 开发版的,因为后者是必需的( as specified in DESCRIPTION)。根据installation instruction in README,这是您安装 blogdown 开发版的方式:
remotes::install_github('rstudio/blogdown')
xfun 的开发版应该会自动安装(注意你需要 RTools)。
【讨论】:
xfun 已安装。但是,即使在安装了blogdown
的开发版之后,也会出现同样的错误:| Installing Hugo The latest Hugo version is v0.89.4 trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.89.4/hugo_extended_0.89.4_Windows-64bit.zip' Content type 'application/octet-stream' length 16437214 bytes (15.7 MB) downloaded 15.7 MB
Hugo has been installed to "C:\Users\hp\AppData\Roaming\Hugo\0.89.4". You are recommended to set options(blogdown.hugo.version = "0.89.4") in the .Rprofile file in your website project. See the blogdown book for more info on .Rprofile: https://bookdown.org/yihui/blogdown/global-options.html Error: 'system3' is not an exported object from 'namespace:xfun'
我的意思是当你remotes::install_github('rstudio/blogdown')
时,它应该自动执行remotes::install_github('yihui/xfun')
。我不知道为什么没有。您可以手动安装 xfun 的开发版。以上是关于blogdown: 'system3' 不是从 'namespace:xfun' 导出的对象的主要内容,如果未能解决你的问题,请参考以下文章
如何在 R-Bloggers 上获取我的 blogdown 博客?