Christopher.Y 2022-03-22 23:01
浏览 221
已结题

MAC系统R中安装BiocManager包报错,下载路径URL、source form或其他问题?求解

在MAC m1芯片系统macOS Monterey 12.3中R语言版本4.1.3,BiocManager1.30.16,Bioconductor3.14,安装单细胞测序所需相关代码,打包安装
安装代码如下:
bioPackages <-c(
"dplyr", "patchwork",
"limma", # 差异分析
"celldex", # 细胞类型参考数据集
"scuttle", # 对SummarizedExperiment对象进行计算
"pheatmap",
"BiocGenerics", 'DelayedArray', 'DelayedMatrixStats',
'limma', 'S4Vectors', 'SingleCellExperiment',
'SummarizedExperiment', 'batchelor', 'Matrix.utils',
"Seurat", "SingleR",
"tximport", # 读取Alevin结果到Seurat
"R.utils", "rliger", "fishpond",
"scater", "scran", "TSCAN", "slingshot",
"scRNAseq",
"AnnotationHub", "ensembldb",
"clusterProfiler", "org.Hs.eg.db",
"cowplot", "enrichplot"
)

批量安装

lapply( bioPackages,
function( bioPackage ){
if( ! bioPackage %in% rownames(installed.packages()) ){
CRANpackages <- available.packages()
if( bioPackage %in% rownames( CRANpackages) ){
install.packages( bioPackage, quiet = TRUE )
}else{
BiocManager::install( bioPackage, suppressUpdates = FALSE, update = FALSE, ask = FALSE)
}
}
}
)

运行结果为:
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
CRAN: https://mirrors.tuna.tsinghua.edu.cn/CRAN/

Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.3 (2022-03-10)
Installing package(s) 'limma'
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘limma’
Do you want to attempt to install these from sources? (Yes/no/cancel)

尝试选择yes与no两种形式进行安装,但安装结果似乎为下载后安装源代码,但安装后自动删除,致使一致无法安装。因为是初学者刚接触单细胞测序及R语言相关代码,上述运行结果代码结果自我感觉有可能为指定网址不正确?于是在网上尝试了两行代码,代码如下:
options(install.packages.check.source = "no")
options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor")
但好像没有什么卵用,运行结果一样,或者可能是源代码问题?这个我就不太明白了,希望大家能给解惑一下🙏

于是本人单独以limma包为例,进行安装尝试,报错结果与上文一致。同时,曾尝试从bioconductor上直接下载limma包进行安装,本人下载网站中macOS 10.13 (High Sierra) limma_3.50.1.tgz此包,在R中安装后,运行:
library(limma)
运行结果为:
错误: package or namespace load failed for ‘limma’:
loadNamespace()里算'limma'时.onLoad失败了,详细内容:
调用: dyn.load(file, DLLpath = DLLpath, ...)
错误: 无法载入共享目标对象‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/limma/libs/limma.so’::
dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/limma/libs/limma.so, 0x0006): tried: '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/limma/libs/limma.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
难道是arm的原因?但是同为m1的舍友可以,我就迷茫了,求大家解惑,搞明白上述问题原因,或者其他方法安装这些包也可以,万分感激🙏

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 3月30日
    • 创建了问题 3月22日

    悬赏问题

    • ¥15 C语言设计一个简单的自动换档程序
    • ¥15 关于logstash转发日志时发生的部分内容丢失问题
    • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。