當我打開 R 時,在我輸入任何命令之前,控制臺會立即顯示一個錯誤,表明該curatedMetagenomicData軟體包未安裝。
R version 4.2.0 (2022-04-22 ucrt) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Error in library("curatedMetagenomicData") :
there is no package called ‘curatedMetagenomicData’
curatedMetagenomicData是我幾年前使用的 Bioconductor 包裝,我一定在某個時候將其移除。當我嘗試重新安裝它時,安裝失敗,似乎是因為它尚未安裝?
> BiocManager::install("curatedMetagenomicData")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.0 (2022-04-22 ucrt)
Installing package(s) 'curatedMetagenomicData'
installing the source package ‘curatedMetagenomicData’
trying URL 'https://bioconductor.org/packages/3.15/data/experiment/src/contrib/curatedMetagenomicData_3.4.2.tar.gz'
Content type 'application/x-gzip' length 1855762 bytes (1.8 MB)
downloaded 1.8 MB
Error in library("curatedMetagenomicData") :
there is no package called 'curatedMetagenomicData'
Execution halted
The downloaded source packages are in
‘C:\Users\jpennycook\AppData\Local\Temp\RtmpqcBkUu\downloaded_packages’
Warning message:
In install.packages(...) :
installation of package ‘curatedMetagenomicData’ had non-zero exit status
這似乎會在意想不到的地方引起問題,例如當我嘗試編織 R Markdown 檔案(與 完全無關curatedMetagenomicData)時,該檔案在 RStudio 的“渲染”視窗中失敗并顯示以下訊息。
Error in library("curatedMetagenomicData") :
there is no package called 'curatedMetagenomicData'
Execution halted
我已嘗試盡可能徹底地洗掉我的 R 和 RStudio 安裝,然后重新安裝,但問題仍然存在。我不明白是什么提示 R 檢查是否安裝了這個包。誰能幫我理解這一點?我目前不需要使用有問題的包,但錯誤變得很痛苦。
編輯:
當我嘗試從源代碼安裝任何軟體包(無論是其他軟體包curatedMetagenomicData,例如dbplyr)時,也會出現此問題。在每種情況下,問題顯然是尚未安裝 curatedMetagenomicData。
> install.packages("C:/Users/jpennycook/AppData/Local/Temp/RtmpqcBkUu/downloaded_packages/curatedMetagenomicData_3.4.2.tar.gz",
repos = NULL, type = "source")
Installing package into ‘C:/Users/jpennycook/Documents/myRlibs’
(as ‘lib’ is unspecified)
Error in library("curatedMetagenomicData") :
there is no package called 'curatedMetagenomicData'
Execution halted
Warning in install.packages :
installation of package ‘C:/Users/jpennycook/AppData/Local/Temp/RtmpqcBkUu/downloaded_packages/curatedMetagenomicData_3.4.2.tar.gz’ had non-zero exit status
> install.packages("C:/Users/jpennycook/AppData/Local/Temp/RtmpqcBkUu/downloaded_packages/dbplyr_2.2.0.tar.gz",
repos = NULL, type = "source")
Installing package into ‘C:/Users/jpennycook/Documents/myRlibs’
(as ‘lib’ is unspecified)
Error in library("curatedMetagenomicData") :
there is no package called 'curatedMetagenomicData'
Execution halted
Warning in install.packages :
installation of package ‘C:/Users/jpennycook/AppData/Local/Temp/RtmpqcBkUu/downloaded_packages/dbplyr_2.2.0.tar.gz’ had non-zero exit status
uj5u.com熱心網友回復:
根據評論中的回復,我會將我的評論提升為答案。
此問題的兩個可能原因是
- 您的主目錄中有一個
.Rprofile檔案正在嘗試加載包 - 您當前的作業目錄中有一個
.RData正在自動加載的檔案;它里面有一個物件會觸發這個包的加載
請注意,在任何一種情況下,名稱以 a 開頭的檔案.通常默認情況下在檔案管理器/檔案串列中是不可見的,因此您可能需要仔細搜索它們
file.exists(".RData")并file.exists("~/.Rprofile")會告訴你這些檔案是否存在;您可以通過臨時移動/重命名每個問題來診斷問題。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/487083.html
上一篇:如何在Windows中使用github.com/AllenDang/giu和github.com/gordonklaus/portaudio構建GO程式
