TError in library(phyloseq) : 不存在叫‘phyloseq’这个名字的程辑包 解决方法 R4.3.0OC
一开始安装r版本为4.3.1发现没有匹配Bioconductor版本,重新下载r4.3.0
然后右键管理员运行
library(phyloseq)
Error in library(phyloseq) : 不存在叫‘phyloseq’这个名字的程辑包
source(‘http://bioconductor.org/biocLite.R’)
Show Traceback
Rerun with Debug
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
install.packages(“ape”)
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
将程序包安装入‘C:/Users/64100/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.3/ape_5.7-1.zip’
Content type ‘application/zip’ length 3402194 bytes (3.2 MB)
downloaded 3.2 MB
if (!require(“BiocManager”, Quiet = TRUE))
-
install.packages("BiocManager")
Error in require(“BiocManager”, Quiet = TRUE) :
unused argument (Quiet = TRUE)
source(‘http://bioconductor.org/biocLite.R’)
Show Traceback
Rerun with Debug
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
if (!require(“BiocManager”, quietly = TRUE))
-
install.packages("BiocManager")
BiocManager::install(version = “3.17”)
‘getOption(“repos”)’ replaces Bioconductor standard repositories, see ‘help(“repositories”, package = “BiocManager”)’
for details.
Replacement repositories:
CRAN: https://cran.rstudio.com/
Downgrade 27 packages to Bioconductor version ‘3.17’? [y/n]:
y
Bioconductor version 3.17 (BiocManager 1.30.22), R 4.3.0 (2023-04-21 ucrt)
Warning messages:
1: package(s) not installed when version(s) same as or greater than current; useforce = TRUE
to re-install:
‘BiocVersion’
2: package(s) not installed when version(s) same as or greater than current; useforce = TRUE
to re-install:
‘AnnotationDbi’ ‘Biobase’ ‘BiocFileCache’ ‘BiocGenerics’ ‘BiocIO’ ‘BiocParallel’ ‘BiocVersion’ ‘biomaRt’ ‘Biostrings’
‘DelayedArray’ ‘GenomeInfoDb’ ‘GenomicAlignments’ ‘GenomicFeatures’ ‘GenomicRanges’ ‘IRanges’ ‘KEGGREST’
‘MatrixGenerics’ ‘Rhtslib’ ‘Rsamtools’ ‘rtracklayer’ ‘S4Arrays’ ‘S4Vectors’ ‘SparseArray’ ‘SummarizedExperiment’
‘XVector’ ‘zlibbioc’
if (!require(“BiocManager”, force = TRUE))
-
install.packages("BiocManager")
Error in require(“BiocManager”, force = TRUE) :
unused argument (force = TRUE)
这里可以看到BiocManager已经被安装了
BiocManager::install(version=‘devel’)
‘getOption(“repos”)’ replaces Bioconductor standard repositories, see ‘help(“repositories”, package = “BiocManager”)’
for details.
Replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.18 (BiocManager 1.30.22), R 4.3.0 (2023-04-21 ucrt)
BiocManager::install(“phyloseq”)
安装成功
后续能够正常运行但报警报大部分包是按4.3.1配置,不影响使用。
另外
library(xlsx)
报错-》按网上说安装java8和jdk均无效
解决方法:
install.packages(“rJava”)
提示什么安装位置不确定,不影响,安装之后即可以正常使用
也有可能是通过一个函数安装的,不记得了
参考:
https://cran.r-project.org/web/packages/BiocManager/vignettes/BiocManager.html
https://stackoverflow.com/questions/55520256/how-did-write-xlsx2-not-encounter-the-same-error-that-write-xlsx-was-giving
https://github.com/joey711/phyloseq/issues/1507
https://github.com/Bioconductor/BiocManager/issues/128
https://joey711.github.io/phyloseq/install.html