如何调试安装 R 包失败



我正在尝试在Jupyter笔记本中安装CRAN软件包(从镜像中),通过JupyterLab启动并在Alpine Linux docker映像中运行,大多数东西都使用conda安装。有些软件包可以工作...

install.packages('ABCanalysis', verbose=TRUE, INSTALL_opts=c('--debug'), repos=...)

。哪些输出...

system (cmd0): /opt/conda/lib/R/bin/R CMD INSTALL --debug 
also installing the dependency 'plotrix'
foundpkgs: plotrix, ABCanalysis, /tmp/RtmpqoorrU/downloaded_packages/plotrix_3.7-4.tar.gz, /tmp/RtmpqoorrU/downloaded_packages/ABCanalysis_1.2.1.tar.gz
files: /tmp/RtmpqoorrU/downloaded_packages/plotrix_3.7-4.tar.gz, 
    /tmp/RtmpqoorrU/downloaded_packages/ABCanalysis_1.2.1.tar.gz
1): succeeded '/opt/conda/lib/R/bin/R CMD INSTALL --debug -l '/opt/conda/lib/R/library' /tmp/RtmpqoorrU/downloaded_packages/plotrix_3.7-4.tar.gz'
2): succeeded '/opt/conda/lib/R/bin/R CMD INSTALL --debug -l '/opt/conda/lib/R/library' /tmp/RtmpqoorrU/downloaded_packages/ABCanalysis_1.2.1.tar.gz'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
install.packages('bitops', verbose=TRUE, INSTALL_opts=c('--debug'), repos=...)

。但是有些软件包没有...

install.packages('bitops', verbose=TRUE, INSTALL_opts=c('--debug'), repos=...)
system (cmd0): /opt/conda/lib/R/bin/R CMD INSTALL --debug
foundpkgs: bitops, /tmp/RtmpqoorrU/downloaded_packages/bitops_1.0-6.tar.gz
files: /tmp/RtmpqoorrU/downloaded_packages/bitops_1.0-6.tar.gz
Warning message in install.packages("bitops", verbose = TRUE, INSTALL_opts = c("--debug"), :
"installation of package 'bitops' had non-zero exit status"Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

我怀疑,但不确定,不需要编译工作的包,以及那些不需要编译工作的包。

如何调试它,即如何发现导致非零退出代码的原因?--debugverbose似乎都没有透露任何有用的东西。

使用 keep_outputs = TRUE ,即

install.packages('bitops', keep_outputs = TRUE, repos=...)

这会将安装的输出保存在当前工作目录中名为 bitops.out 的文件中。

相关内容

  • 没有找到相关文章

最新更新