当我在 R 中安装名为“scater”的包时出现问题

问题描述 投票:0回答:1

我正在尝试学习 scRNAseq 中的工作流程,需要一个名为“scater”的包。 “densvis”是一个依赖项。

这是安装结束时发生的情况。

ld: warning: directory not found for option '-L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0'
ld: warning: directory not found for option '-L/opt/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [densvis.so] Error 1
ERROR: compilation failed for package ‘densvis’

我使用的是配备 M1 芯片的 MacBook Pro。

我按照该网站上描述的步骤操作 https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/

但是没有成功。我不知道我这样做是否正确。

r macos bioinformatics
1个回答
0
投票

对于到达这里的人,解决方案是使用自制程序在 Mac 上安装 gfortran。默认情况下,这应该转到 /opt ,它解决了上面提到的缺少库警告。

brew install gfortran
© www.soinside.com 2019 - 2024. All rights reserved.