英文:
Fatal error relating to "include S.h" when installing R 'scalop' package
问题
我正尝试安装一个名为'infercna'的R包,其GitHub存储库链接在这里。
安装过程尝试加载另一个名为'scalop'的包,其链接在这里。
具体而言,这个命令:
devtools::install_github("jlaffy/infercna")
返回如下:
下载 GitHub 存储库 jlaffy/infercna@HEAD
── R CMD 构建 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ 检查文件 ‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/RtmpqQIEYL/remotes7d75586a9ac5/jlaffy-infercna-98a8db8/DESCRIPTION’ (343ms)
── 准备 ‘infercna’:
✔ 检查 DESCRIPTION 元信息 ...
── 检查源文件和构建文件以及 shell 脚本中的 LF 行结束符
── 检查空目录或不需要的目录
NB: 此包现在依赖于 R (>= 3.5.0)
警告: 添加了对 R (>= 3.5.0) 的依赖,因为序列化对象在旧版本的 R 中无法读取。
包含此类对象的文件:
‘infercna/data-raw/genes.rda’
── 构建 ‘infercna_1.0.0.tar.gz’
* 正在安装 *source* 包 ‘infercna’ ...
** 使用分阶段安装
** R
** 数据
*** 将数据集移动到 lazyload DB
** 编译字节码并为延迟加载准备包
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
没有叫做 ‘scalop’ 的包
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package ‘infercna’
* 删除 ‘/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/infercna’
因此,我回溯并尝试安装'scalop',如下:
```R
remotes::install_github("jlaffy/scalop")
从这里开始情况变得非常复杂。要安装'scalop',需要95个依赖项。成功安装所有95个依赖项后,安装'scalop'最终仍然会失败,如下:
检查文件 ‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/RtmpqQIEYL/remotes7d757fe15404/jlaffy-scalop-021999d/DESCRIPTION’ ...
── 准备 ‘scalop’: (385ms)
✔ 检查 DESCRIPTION 元信息 ...
── 清理 src
── 检查源文件和构建文件以及 shell 脚本中的 LF 行结束符
── 检查空目录或不需要的目录
── 构建 ‘scalop_1.1.0.tar.gz’
* 正在安装 *source* 包 ‘scalop’ ...
** 使用分阶段安装
** libs
使用 C 编译器: ‘Apple clang version 11.0.3 (clang-1103.0.32.62)’
使用 SDK: ‘MacOSX10.15.sdk’
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c nd.c -o nd.o
nd.c:24:10: fatal error: ‘S.h’ file not found
#include "S.h"
^~~~~
1 error generated.
make: *** [nd.o] Error 1
ERROR: compilation failed for package ‘scalop’
* 删除 ‘/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/scalop’
我写信是想问有没有人对这个输出了解足够多,知道如何修复“致命错误,未找到‘S.h’文件”的错误,这个错误最终导致下载失败。
已经有几个人通过在scalop的问题页面上发表问题,特别是问题4和问题5来联系作者,但没有回复。此外,将错误消息发布到Google并没有返回有用的结果,就我所见。
最后,我愿意提供所有必要的信息;例如 sessionInfo()
,R版本(4.3),Mac OS(11.7)等。
帮助我,Stack Overflow-Kenobi,你是我唯一的希望。
英文:
I am attempting to install an R package named 'infercna', the github repository to which is linked here.
The install process attempts to load another package named 'scalop', which is linked here.
Specifically, this command:
devtools::install_github("jlaffy/infercna")
returns
Downloading GitHub repo jlaffy/infercna@HEAD
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/RtmpqQIEYL/remotes7d75586a9ac5/jlaffy-infercna-98a8db8/DESCRIPTION’ (343ms)
─ preparing ‘infercna’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
NB: this package now depends on R (>= 3.5.0)
WARNING: Added dependency on R >= 3.5.0 because serialized objects in
serialize/load version 3 cannot be read in older versions of R.
File(s) containing such objects:
‘infercna/data-raw/genes.rda’
─ building ‘infercna_1.0.0.tar.gz’
* installing *source* package ‘infercna’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘scalop’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package ‘infercna’
* removing ‘/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/infercna’
As such, I backtracked and attempted to install scalop, like so:
remotes::install_github("jlaffy/scalop")
This is where things start to really get hairy. To install, scalop requires 95 dependencies. Upon successful installation of all 95, the installation for scalop will eventually still fail, like so:
checking for file ‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/RtmpqQIEYL/remotes7d757fe15404/jlaffy-scalop-021999d/DESCRIPTION’ ...
─ preparing ‘scalop’: (385ms)
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘scalop_1.1.0.tar.gz’
* installing *source* package ‘scalop’ ...
** using staged installation
** libs
using C compiler: ‘Apple clang version 11.0.3 (clang-1103.0.32.62)’
using SDK: ‘MacOSX10.15.sdk’
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c nd.c -o nd.o
nd.c:24:10: fatal error: 'S.h' file not found
#include "S.h"
^~~~~
1 error generated.
make: *** [nd.o] Error 1
ERROR: compilation failed for package ‘scalop’
* removing ‘/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/scalop’
I am writing to ask if anyone knows enough about this output to know what to do to fix the "fatal error, 'S.h' file not found" error, which ultimately kills the download.
Several people have reached out to the author, as per the issues posted on scalop; specifically issues 4 and 5, but no reply. Additionally, posting the error message into google does not return useful hits, so far as I can see.
Finally, I am happy to provide any and all necessary info; e.g. sessionInfo()
, R version (4.3) Mac OS (11.7) etc.
Help me Stack Overflow-Kenobi, you're my only hope.
答案1
得分: 1
以下是翻译好的部分:
-
"S.h" 头文件来自于 "S" 语言(R 语言的前身);将 "S.h" 替换为 "R.h" 可以修复 '找不到 S.h' 错误,但会引发其他问题。显然,这个软件包没有得到维护
-
我分叉了存储库并对源代码进行了一些更改(提交 fe15cf9 和 ab9fe5c)。我成功地通过 Bioconductor 安装了 scalop 和 infercna 软件包,但它们在编译时会产生很多警告。我使用 gcc 编译它们,而不是 Apple Clang,并使用了以下标志:
cat ~/.R/Makevars LOC=/usr/local/gfortran CC=$(LOC)/bin/gcc -fopenmp CXX=$(LOC)/bin/g++ -fopenmp CXX11=$(LOC)/bin/g++ -fopenmp CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe LDFLAGS=-L$(LOC)/lib -Wl,-rpath,$(LOC)/lib,-L/usr/local/lib CPPFLAGS=-I$(LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm CXX1X=/usr/local/gfortran/bin/g++ CXX98=/usr/local/gfortran/bin/g++ CXX11=/usr/local/gfortran/bin/g++ CXX14=/usr/local/gfortran/bin/g++ CXX17=/usr/local/gfortran/bin/g++
-
如果您在使用 Apple Clang 安装 scalop 软件包时遇到问题,并且您有英特尔处理器,可以尝试查看此处的编译 R 软件包的说明:https://stackoverflow.com/a/65334247/12957340
-
如果您有 Apple Silicon 处理器,可以尝试查看此处的说明:https://stackoverflow.com/a/68275558/12957340
-
这是我安装软件包的方法:
install.packages("BiocManager") library(BiocManager) BiocManager::install("Homo.sapiens") BiocManager::install("jpmam1/scalop") # 我的分叉版本 BiocManager::install("jlaffy/infercna")
-
示例来自于用户手册,但其中一些函数不再按预期工作。
-
根据您的用例,您可能需要进一步更改源代码以获得所需的输出。如果您有更多的错误或问题,请在评论中发布,我会在有时间时查看它们。
-
R 会话信息:
R 版本 4.3.0(2023-04-21) 平台:x86_64-apple-darwin20(64 位) 运行在:macOS Ventura 13.3.1
请注意,这些信息可能已过时,因为是从提供的文本中提取的。
英文:
The "S.h" headers file is from the "S" language (the precursor to R); replacing "S.h" with "R.h" fixes the 'cant find S.h' error, but causes other issues. Clearly this package is not being maintained
I've forked the repository and made a couple of changes to the source code (commits fe15cf9 and ab9fe5c). I successfully installed both the scalop and infercna packages via Bioconductor, but there are a lot of warnings when they compile. I used gcc to compile them, rather than Apple Clang, with these flags:
cat ~/.R/Makevars
LOC=/usr/local/gfortran
CC=$(LOC)/bin/gcc -fopenmp
CXX=$(LOC)/bin/g++ -fopenmp
CXX11=$(LOC)/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L$(LOC)/lib -Wl,-rpath,$(LOC)/lib,-L/usr/local/lib
CPPFLAGS=-I$(LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++
If you have problems installing the scalop package from source using Apple Clang, and you have an intel processor, my instructions for compiling R packages from source are here: https://stackoverflow.com/a/65334247/12957340
If you have an Apple silicon processor, you can try the instructions here: https://stackoverflow.com/a/68275558/12957340
This is how I installed the packages:
install.packages("BiocManager")
library(BiocManager)
BiocManager::install("Homo.sapiens")
BiocManager::install("jpmam1/scalop") # my forked copy
BiocManager::install("jlaffy/infercna")
The example from the vignette runs, but some of the functions no longer work as expected:
library(infercna)
#>
#>
#> Warning: replacing previous import 'AnnotationDbi::select' by 'dplyr::select'
#> when loading 'scalop'
#>
#> Attaching package: 'infercna'
#> The following object is masked from 'package:graphics':
#>
#> clip
set.seed(1014)
useGenome('hg19')
#> Genome has been set to hg19
retrieveGenome()
#> Retrieving: hg19
#> # A tibble: 33,575 × 8
#> symbol start_position end_position chromosome_name arm band strand
#> <chr> <dbl> <dbl> <fct> <fct> <chr> <int>
#> 1 DDX11L1 11869 14412 1 1p p36.33 1
#> 2 WASH7P 14363 29806 1 1p p36.33 -1
#> 3 MIR1302-11 29554 31109 1 1p p36.33 1
#> 4 FAM138A 34554 36081 1 1p p36.33 -1
#> 5 OR4G4P 52473 54936 1 1p p36.33 1
#> 6 OR4G11P 62948 63887 1 1p p36.33 1
#> 7 OR4F5 69091 70008 1 1p p36.33 1
#> 8 CICP27 131025 134836 1 1p p36.33 1
#> 9 RNU6-1100P 157784 157887 1 1p p36.33 -1
#> 10 CICP7 329431 332236 1 1p p36.33 -1
#> # ℹ 33,565 more rows
#> # ℹ 1 more variable: ensembl_gene_id <chr>
m = useData(mgh125)
dim(m)
#> [1] 8556 1266
range(m)
#> [1] 0.000 15.328
lengths(refCells)
#> oligodendrocytes macrophages
#> 219 707
cna = infercna(m = m, refCells = refCells, n = 5000, noise = 0.1, isLog = TRUE, verbose = FALSE)
cnaM = cna[, !colnames(cna) %in% unlist(refCells)]
cnaScatterPlot(cna = cna,
signal.threshold = NULL,
main = 'Default')
<!-- -->
obj = cnaPlot(cna = cna,
order.cells = TRUE,
subtitle = 'Copy-Number Aberrations in a patient with Glioblastoma')
#> Error in if (class(x) == "matrix") {: the condition has length > 1
Depending on your use-case, you'll probably need to make further changes to the source code to get your desired output. If you have further errors/questions please post them in the comments and I'll take a look at them when I have some time.
sessionInfo()
#> R version 4.3.0 (2023-04-21)
#> Platform: x86_64-apple-darwin20 (64-bit)
#> Running under: macOS Ventura 13.3.1
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
#>
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#>
#> time zone: Australia/Melbourne
#> tzcode source: internal
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] infercna_1.0.0
#>
#> loaded via a namespace (and not attached):
#> [1] splines_4.3.0
#> [2] BiocIO_1.10.0
#> [3] bitops_1.0-7
#> [4] ggplotify_0.1.0
#> [5] filelock_1.0.2
#> [6] tibble_3.2.1
#> [7] R.oo_1.25.0
#> [8] polyclip_1.10-4
#> [9] graph_1.78.0
#> [10] reprex_2.0.2
#> [11] XML_3.99-0.14
#> [12] lifecycle_1.0.3
#> [13] rstatix_0.7.2
#> [14] edgeR_3.42.4
#> [15] Homo.sapiens_1.3.1
#> [16] lattice_0.21-8
#> [17] MASS_7.3-60
#> [18] OrganismDbi_1.42.0
#> [19] backports_1.4.1
#> [20] magrittr_2.0.3
#> [21] limma_3.56.1
#> [22] plotly_4.10.1
#> [23] rmarkdown_2.22
#> [24] yaml_2.3.7
#> [25] metapod_1.8.0
#> [26] cowplot_1.1.1
#> [27] DBI_1.1.3
#> [28] RColorBrewer_1.1-3
#> [29] abind_1.4-5
#> [30] zlibbioc_1.46.0
#> [31] Rtsne_0.16
#> [32] R.cache_0.16.0
#> [33] GenomicRanges_1.52.0
#> [34] purrr_1.0.1
#> [35] mixtools_2.0.0
#> [36] R.utils_2.12.2
#> [37] msigdbr_7.5.1
#> [38] ggraph_2.1.0
#> [39] BiocGenerics_0.46.0
#> [40] RCurl_1.98-1.12
#> [41] styler_1.10.0
#> [42] yulab.utils_0.0.6
#> [43] tweenr_2.0.2
#> [44] rappdirs_0.3.3
#> [45] GenomeInfoDbData_1.2.10
#> [46] IRanges_2.34.0
#> [47] S4Vectors_0.38.1
#> [48] enrichplot_1.20.0
#> [49] ggrepel_0.9.3
#> [50] irlba_2.3.5.1
#> [51] tidytree_0.4.2
#> [52] dqrng_0.3.0
#> [53] DelayedMatrixStats_1.22.0
#> [54] codetools_0.2-19
#> [55] DelayedArray_0.26.3
#> [56] scuttle_1.10.1
#> [57] DOSE_3.26.1
#> [58] xml2_1.3.4
#> [59] ggforce_0.4.1
#> [60] tidyselect_1.2.0
#> [61] aplot_0.1.10
#> [62] farver_2.1.1
#> [63] ScaledMatrix_1.8.1
#> [64] viridis_0.6.3
#> [65] matrixStats_0.63.0
#> [66] stats4_4.3.0
#> [67] BiocFileCache_2.8.0
#> [68] GenomicAlignments_1.36.0
#> [69] jsonlite_1.8.4
#> [70] BiocNeighbors_1.18.0
#> [71] tidygraph_1.2.3
#> [72] survival_3.5-5
#> [73] segmented_1.6-4
#> [74] tools_4.3.0
#> [75] progress_1.2.2
#> [76] treeio_1.24.1
#> [77] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
#> [78] Rcpp_1.0.10
#> [79] glue_1.6.2
#> [80] gridExtra_2.3
#> [81] xfun_0.39
#> [82] qvalue_2.32.0
#> [83] MatrixGenerics_1.12.0
#> [84] GenomeInfoDb_1.36.0
#> [85] dplyr_1.1.2
#> [86] withr_2.5.0
#> [87] BiocManager_1.30.20
#> [88] fastmap_1.1.1
#> [89] bluster_1.10.0
#> [90] fansi_1.0.4
#> [91] rsvd_1.0.5
#> [92] caTools_1.18.2
#> [93] digest_0.6.31
#> [94] R6_2.5.1
#> [95] gridGraphics_0.5-1
#> [96] colorspace_2.1-0
#> [97] GO.db_3.17.0
#> [98] biomaRt_2.56.0
#> [99] RSQLite_2.3.1
#> [100] R.methodsS3_1.8.2
#> [101] utf8_1.2.3
#> [102] tidyr_1.3.0
#> [103] generics_0.1.3
#> [104] data.table_1.14.8
#> [105] rtracklayer_1.60.0
#> [106] prettyunits_1.1.1
#> [107] graphlayouts_1.0.0
#> [108] httr_1.4.6
#> [109] htmlwidgets_1.6.2
#> [110] S4Arrays_1.0.4
#> [111] scatterpie_0.2.0
#> [112] pkgconfig_2.0.3
#> [113] gtable_0.3.3
#> [114] blob_1.2.4
#> [115] SingleCellExperiment_1.22.0
#> [116] XVector_0.40.0
#> [117] shadowtext_0.1.2
#> [118] clusterProfiler_4.8.1
#> [119] htmltools_0.5.5
#> [120] carData_3.0-5
#> [121] fgsea_1.26.0
#> [122] scalop_1.1.0
#> [123] RBGL_1.76.0
#> [124] scales_1.2.1
#> [125] Biobase_2.60.0
#> [126] png_0.1-8
#> [127] scran_1.28.1
#> [128] ggfun_0.0.9
#> [129] knitr_1.43
#> [130] rstudioapi_0.14
#> [131] reshape2_1.4.4
#> [132] rjson_0.2.21
#> [133] nlme_3.1-162
#> [134] curl_5.0.0
#> [135] org.Hs.eg.db_3.17.0
#> [136] cachem_1.0.8
#> [137] stringr_1.5.0
#> [138] parallel_4.3.0
#> [139] HDO.db_0.99.1
#> [140] AnnotationDbi_1.62.1
#> [141] restfulr_0.0.15
#> [142] pillar_1.9.0
#> [143] grid_4.3.0
#> [144] vctrs_0.6.2
#> [145] ggpubr_0.6.0
#> [146] BiocSingular_1.16.0
#> [147] car_3.1-2
#> [148] beachmat_2.16.0
#> [149] dbplyr_2.3.2
#> [150] cluster_2.1.4
#> [151] evaluate_0.21
#> [152] zeallot_0.1.0
#> [153] GenomicFeatures_1.52.0
#> [154] locfit_1.5-9.7
#> [155] cli_3.6.1
#> [156] compiler_4.3.0
#> [157] Rsamtools_2.16.0
#> [158] rlang_1.1.1
#> [159] crayon_1.5.2
#> [160] ggsignif_0.6.4
#> [161] plyr_1.8.8
#> [162] fs_1.6.2
#> [163] stringi_1.7.12
#> [164] viridisLite_0.4.2
#> [165] BiocParallel_1.34.2
#> [166] babelgene_22.9
#> [167] munsell_0.5.0
#> [168] Biostrings_2.68.1
#> [169] lazyeval_0.2.2
#> [170] GOSemSim_2.26.0
#> [171] Matrix_1.5-4.1
#> [172] patchwork_1.1.2
#> [173] hms_1.1.3
#> [174] sparseMatrixStats_1.12.0
#> [175] bit64_4.0.5
#> [176] ggplot2_3.4.2
#> [177] statmod_1.5.0
#> [178] KEGGREST_1.40.0
#> [179] SummarizedExperiment_1.30.1
#> [180] kernlab_0.9-32
#> [181] igraph_1.4.3
#> [182] broom_1.0.4
#> [183] memoise_2.0.1
#> [184] ggtree_3.8.0
#> [185] fastmatch_1.1-3
#> [186] bit_4.0.5
#> [187] downloader_0.4
#> [188] gson_0.1.0
#> [189] ape_5.7-1
<sup>Created on 2023-06-02 with reprex v2.0.2</sup>
答案2
得分: 1
因为贾里德的回答中提到安装GCC可能需要几个小时,所以我想看看他所做的更改,以及与使用BiocManager进行安装相结合,是否可以解决这个问题。
事实上,对我来说是可以的。
具体的步骤如下:
首先安装所有其他依赖项,例如通过运行
devtools::install_github("jlaffy/infercna")
在依赖项安装完成后,包将失败,如原始帖子中所示。在此之后运行:
install.packages("BiocManager") # 如果未安装
library(BiocManager)
BiocManager::install("Homo.sapiens")
BiocManager::install("jpmam1/scalop") # 贾里德的优秀分支副本
BiocManager::install("jlaffy/infercna")
对我来说,在R v4.3、MacOSX 11.7、Intel芯片上,这将返回:
BiocManager::install("Homo.sapiens")
'getOption("repos")' 替代了Bioconductor标准存储库,有关详细信息,请参阅'help("repositories", package = "BiocManager")'。
替代存储库:
CRAN: https://cran.rstudio.com/
Bioconductor版本3.17(BiocManager 1.30.20),R 4.3.0(2023-04-21)
正在安装软件包'Homo.sapiens'
也安装依赖项'graph','RBGL','OrganismDbi'
尝试URL'https://bioconductor.org/packages/3.17/bioc/bin/macosx/big-sur-x86_64/contrib/4.3/graph_1.78.0.tgz'
内容类型'application/x-gzip'长度2086473字节(2.0 MB)
==================================================
下载了2.0 MB
尝试URL'https://bioconductor.org/packages/3.17/bioc/bin/macosx/big-sur-x86_64/contrib/4.3/RBGL_1.76.0.tgz'
内容类型'application/x-gzip'长度3547879字节(3.4 MB)
==================================================
下载了3.4 MB
尝试URL'https://bioconductor.org/packages/3.17/bioc/bin/macosx/big-sur-x86_64/contrib/4.3/OrganismDbi_1.42.0.tgz'
内容类型'application/x-gzip'长度796254字节(777 KB)
==================================================
下载了777 KB
下载的二进制软件包位于
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
正在安装源软件包'Homo.sapiens'
尝试URL'https://bioconductor.org/packages/3.17/data/annotation/src/contrib/Homo.sapiens_1.3.1.tar.gz'
内容类型'application/x-gzip'长度1617字节
==================================================
下载了1617字节
* 正在安装*源*软件包'Homo.sapiens' ...
** 使用分阶段安装
** R
** 数据
** 字节编译并准备包以进行惰性加载
** 帮助
*** 安装帮助索引
** 构建软件包索引
** 测试是否可以从临时位置加载已安装的软件包
** 测试是否可以从最终位置加载已安装的软件包
** 测试是否已安装的软件包保留了临时安装路径的记录
* 完成(Homo.sapiens)
下载的源软件包位于
‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/Rtmp6rXv9T/downloaded_packages’
旧软件包:'matrixStats'
更新全部/一些/无? [a/s/n]:BiocManager::install("jpmam1/scalop")
更新全部/一些/无? [a/s/n]:
a
尝试URL'https://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/matrixStats_0.63.0.tgz'
内容类型'application/x-gzip'长度653132字节(637 KB)
==================================================
下载了637 KB
下载的二进制软件包位于
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
> BiocManager::install("jpmam1/scalop")
'getOption("repos")' 替代了Bioconductor标准存储库,有关详细信息,请参阅'help("repositories", package = "BiocManager")'。
替代存储库:
CRAN: https://cran.rstudio.com/
Bioconductor版本3.17(BiocManager 1.30.20),R 4.3.0(2023-04-21)
正在安装GitHub软件包'scalop'
下载GitHub存储库jpmam1/scalop@HEAD
这些软件包有更新版本可用。
建议更新所有这些软件包。
您想要更新哪个?
1:全部
2:仅CRAN软件包
3:无
4:matrixStats(0.63.0 -> 1.0.0)[CRAN]
输入一个或多个数字,或按回车键跳过更新:1
matrixStats(0.63.0 -> 1.0.0)[CRAN]
正在安装1个软件包:matrixStats
尝试URL'https://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/matrixStats_0.63.0.tgz'
内容类型'application/x-gzip'长度653132字节(637 KB)
==================================================
下载了637 KB
下载的二进制软件包位于
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
─ R CMD构建────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ 检查文件'/private/var/folders/hj
<details>
<summary>英文:</summary>
All - because in jared's answer he notes installing GCC can take hours, I wanted to see if the changes he made, in conjunction with use of BiocManager for installation, would solve the problem.
In fact, for me it does.
Specifically, the procedure is:
Install all other dependencies first, e.g. by running
devtools::install_github("jlaffy/infercna")
after the dependencies install, the package will fail as indicated in the original post. Following this, run:
install.packages("BiocManager") # if not installed
library(BiocManager)
BiocManager::install("Homo.sapiens")
BiocManager::install("jpmam1/scalop") # Jared's awesome forked copy
BiocManager::install("jlaffy/infercna")
For me, on R v4.3, MacOSX 11.7, intel chip, this returns:
BiocManager::install("Homo.sapiens")
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing package(s) 'Homo.sapiens'
also installing the dependencies ‘graph’, ‘RBGL’, ‘OrganismDbi’
trying URL 'https://bioconductor.org/packages/3.17/bioc/bin/macosx/big-sur-x86_64/contrib/4.3/graph_1.78.0.tgz'
Content type 'application/x-gzip' length 2086473 bytes (2.0 MB)
==================================================
downloaded 2.0 MB
trying URL 'https://bioconductor.org/packages/3.17/bioc/bin/macosx/big-sur-x86_64/contrib/4.3/RBGL_1.76.0.tgz'
Content type 'application/x-gzip' length 3547879 bytes (3.4 MB)
==================================================
downloaded 3.4 MB
trying URL 'https://bioconductor.org/packages/3.17/bioc/bin/macosx/big-sur-x86_64/contrib/4.3/OrganismDbi_1.42.0.tgz'
Content type 'application/x-gzip' length 796254 bytes (777 KB)
==================================================
downloaded 777 KB
The downloaded binary packages are in
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
installing the source package ‘Homo.sapiens’
trying URL 'https://bioconductor.org/packages/3.17/data/annotation/src/contrib/Homo.sapiens_1.3.1.tar.gz'
Content type 'application/x-gzip' length 1617 bytes
==================================================
downloaded 1617 bytes
* installing *source* package ‘Homo.sapiens’ ...
** using staged installation
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Homo.sapiens)
The downloaded source packages are in
‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/Rtmp6rXv9T/downloaded_packages’
Old packages: 'matrixStats'
Update all/some/none? [a/s/n]: BiocManager::install("jpmam1/scalop")
Update all/some/none? [a/s/n]:
a
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/matrixStats_0.63.0.tgz'
Content type 'application/x-gzip' length 653132 bytes (637 KB)
==================================================
downloaded 637 KB
The downloaded binary packages are in
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
> BiocManager::install("jpmam1/scalop")
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing github package(s) 'jpmam1/scalop'
Downloading GitHub repo jpmam1/scalop@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: matrixStats (0.63.0 -> 1.0.0) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 1
matrixStats (0.63.0 -> 1.0.0) [CRAN]
Installing 1 packages: matrixStats
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/matrixStats_0.63.0.tgz'
Content type 'application/x-gzip' length 653132 bytes (637 KB)
==================================================
downloaded 637 KB
The downloaded binary packages are in
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/Rtmp6rXv9T/remotes13284246ba83/jpmam1-scalop-ab9fe5c/DESCRIPTION’ ...
─ preparing ‘scalop’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘scalop_1.1.0.tar.gz’
* installing *source* package ‘scalop’ ...
** using staged installation
** libs
using C compiler: ‘Apple clang version 11.0.3 (clang-1103.0.32.62)’
using SDK: ‘MacOSX10.15.sdk’
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c nd.c -o nd.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c rowttests.c -o rowttests.o
clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o scalop.so init.o nd.o rowttests.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-scalop/00new/scalop/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Warning: replacing previous import ‘AnnotationDbi::select’ by ‘dplyr::select’ when loading ‘scalop’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning: replacing previous import ‘AnnotationDbi::select’ by ‘dplyr::select’ when loading ‘scalop’
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
Warning: replacing previous import ‘AnnotationDbi::select’ by ‘dplyr::select’ when loading ‘scalop’
** testing if installed package keeps a record of temporary installation path
* DONE (scalop)
Old packages: 'matrixStats'
Update all/some/none? [a/s/n]:
a
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/matrixStats_0.63.0.tgz'
Content type 'application/x-gzip' length 653132 bytes (637 KB)
==================================================
downloaded 637 KB
The downloaded binary packages are in
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
> BiocManager::install("jlaffy/infercna")
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing github package(s) 'jlaffy/infercna'
Downloading GitHub repo jlaffy/infercna@HEAD
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T/Rtmp6rXv9T/remotes13287d6716f0/jlaffy-infercna-98a8db8/DESCRIPTION’ ...
─ preparing ‘infercna’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
NB: this package now depends on R (>= 3.5.0)
WARNING: Added dependency on R >= 3.5.0 because serialized objects in
serialize/load version 3 cannot be read in older versions of R.
File(s) containing such objects:
‘infercna/data-raw/genes.rda’
─ building ‘infercna_1.0.0.tar.gz’
* installing *source* package ‘infercna’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Warning: replacing previous import ‘AnnotationDbi::select’ by ‘dplyr::select’ when loading ‘scalop’
Note: ... may be used in an incorrect context
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning: replacing previous import ‘AnnotationDbi::select’ by ‘dplyr::select’ when loading ‘scalop’
** testing if installed package can be loaded from final location
Warning: replacing previous import ‘AnnotationDbi::select’ by ‘dplyr::select’ when loading ‘scalop’
** testing if installed package keeps a record of temporary installation path
* DONE (infercna)
Old packages: 'matrixStats'
Update all/some/none? [a/s/n]:
a
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/matrixStats_0.63.0.tgz'
Content type 'application/x-gzip' length 653132 bytes (637 KB)
==================================================
downloaded 637 KB
The downloaded binary packages are in
/var/folders/hj/1wvjfb692c3gswybcg8xdcwm0000gn/T//Rtmp6rXv9T/downloaded_packages
This saves the user from needing to uninstall (or from having to install) important functionality contained in xcode / GCC.
For completeness and context, here is my sessionInfo():
sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.7
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Detroit
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] SummarizedExperiment_1.30.1 gtable_0.3.3 ggplot2_3.4.2 htmlwidgets_1.6.2 remotes_2.4.2
[6] ggrepel_0.9.3 processx_3.8.1 Biobase_2.60.0 lattice_0.21-8 callr_3.7.3
[11] vctrs_0.6.2 tools_4.3.0 ps_1.7.5 bitops_1.0-7 generics_0.1.3
[16] stats4_4.3.0 curl_5.0.0 tibble_3.2.1 fansi_1.0.4 pkgconfig_2.0.3
[21] Matrix_1.5-4.1 data.table_1.14.8 desc_1.4.2 S4Vectors_0.38.1 lifecycle_1.0.3
[26] GenomeInfoDbData_1.2.10 compiler_4.3.0 munsell_0.5.0 GenomeInfoDb_1.36.0 htmltools_0.5.5
[31] RCurl_1.98-1.12 lazyeval_0.2.2 plotly_4.10.1 pillar_1.9.0 crayon_1.5.2
[36] tidyr_1.3.0 DelayedArray_0.26.3 tidyselect_1.2.0 locfit_1.5-9.7 digest_0.6.31
[41] dplyr_1.1.2 purrr_1.0.1 rprojroot_2.0.3 fastmap_1.1.1 grid_4.3.0
[46] colorspace_2.1-0 cli_3.6.1 magrittr_2.0.3 S4Arrays_1.0.4 pkgbuild_1.4.0
[51] utf8_1.2.3 withr_2.5.0 prettyunits_1.1.1 scales_1.2.1 XVector_0.40.0
[56] httr_1.4.6 matrixStats_0.63.0 GenomicRanges_1.52.0 IRanges_2.34.0 viridisLite_0.4.2
[61] rlang_1.1.1 Rcpp_1.0.10 glue_1.6.2 BiocManager_1.30.20 BiocGenerics_0.46.0
[66] rstudioapi_0.14 jsonlite_1.8.4 R6_2.5.1 MatrixGenerics_1.12.0 zlibbioc_1.46.0
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论