简体   繁体   English

错误:package 或“tidyverse”的命名空间加载失败,没有 package 称为“reprex”

[英]Error: package or namespace load failed for ‘tidyverse’ there is no package called ‘reprex’

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘reprex’

I am using this version of R version 4.0.3 (2020-10-10) also I tried to install the library "reprex" but I had this我正在使用这个版本的 R版本 4.0.3 (2020-10-10)我也尝试安装库“reprex”但我有这个

install.packages("reprex")
also installing the dependency ‘withr’

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/withr_2.4.1.tgz'
Warning in install.packages :
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/withr_2.4.1.tgz': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/withr_2.4.1.tgz'
Warning in install.packages :
  download of package ‘withr’ failed
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/reprex_1.0.0.tgz'
Warning in install.packages :
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/reprex_1.0.0.tgz': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/reprex_1.0.0.tgz'
Warning in install.packages :
  download of package ‘reprex’ failed

I have macOs Big Sur我有 macOS 大苏尔

I just had the exact same issue on MacOS big sur too.我在 MacOS big sur 上也遇到了完全相同的问题。 It does work now tho.它现在确实有效。 I installed ggplot2 install.packages("ggplot2") which also installed withr, the package that it could not find before.我安装了 ggplot2 install.packages("ggplot2") ,它也安装了之前找不到的 package。

also installing the dependency 'withr'还安装依赖项'withr'

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/withr_2.4.1.tgz'
Content type 'application/x-gzip' length 205896 bytes (201 KB)
==================================================
downloaded 201 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/ggplot2_3.3.3.tgz'
Content type 'application/x-gzip' length 4068756 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

After that, I installed tidyverse again and the problem was solved.之后我又安装了tidyverse,问题就解决了。

> install.packages("tidyverse")
also installing the dependency ‘reprex’

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/reprex_1.0.0.tgz'
Content type 'application/x-gzip' length 478248 bytes (467 KB)
==================================================
downloaded 467 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/tidyverse_1.3.0.tgz'
Content type 'application/x-gzip' length 433049 bytes (422 KB)
==================================================
downloaded 422 KB

> library(tidyverse)
── Attaching packages ─────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
✓ ggplot2 3.3.3     ✓ purrr   0.3.4
✓ tibble  3.0.5     ✓ dplyr   1.0.3
✓ tidyr   1.1.2     ✓ stringr 1.4.0
✓ readr   1.4.0     ✓ forcats 0.5.1

I am not sure if the solution was indeed installing ggplot2.我不确定解决方案是否确实安装了 ggplot2。 This is my first time using R.这是我第一次使用 R。 (I follow a data science course on edX) (我在 edX 上学习数据科学课程)

Cheers!干杯!

  • Enzo恩佐

暂无
暂无

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

相关问题 错误:package 或“tidyverse”的命名空间加载失败,没有名为“rlang”的 package - Error: package or namespace load failed for “tidyverse” there is no package called “rlang” 错误:loadNamespace 中“tidyverse”的包或命名空间加载失败 - Error: package or namespace load failed for ‘tidyverse’ in loadNamespace 运行 R Markdown '包或命名空间加载失败'时出现 tidyverse 错误 - tidyverse error while running R Markdown 'package or namespace load failed' 错误:package 或“tidyverse”的命名空间加载失败:object “relocate”未由“namespace:dplyr”导出 - Error: package or namespace load failed for ‘tidyverse’: object ‘relocate’ is not exported by 'namespace:dplyr' 错误:程序包或命名空间加载失败 - Error: Package or namespace load failed 尝试加载 tidyverse 但我遇到“&gt; library(tidyverse) 库中的错误 (tidyverse):没有 package 称为 'tidyverse'” - tried to load tidyverse but I'm met with “> library(tidyverse) Error in library(tidyverse) : there is no package called ‘tidyverse’” 库中的错误(tidyverse):没有名为&#39;tidyverse&#39;的包 - Error in library(tidyverse) : there is no package called ‘tidyverse’ “Hmisc”包或命名空间加载失败 - 没有名为“latticeExtra”的包 - "Hmisc" package or namespace failed to load - no package called 'latticeExtra' 加载 ggplot2 时抛出错误:package 或命名空间加载失败....没有 package 称为“颜色空间” - Loading ggplot2 throwing the Error: package or namespace load failed .... there is no package called ‘colorspace’ 错误:“ RevoUtilsMath”的程序包或名称空间加载失败 - Error: package or namespace load failed for 'RevoUtilsMath'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM