我使用 renv 来快照我创建的数据集所需的包库:https://github.com/mtwente/nordatlantisk-ft。但是,我在另一台计算机上克隆了存储库,并希望使用
renv::restore()
恢复项目库,这导致了大量错误消息。
renv 抛出错误的计算机具有以下内容
sessionInfo()
:
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.2.1
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-arm64/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: Europe/Zurich
tzcode source: internal
attached base packages:
[1] stats graphics grDevices datasets utils methods base
loaded via a namespace (and not attached):
[1] compiler_4.3.2 tools_4.3.2 renv_1.0.3
我在 R Studio 中打开该项目并运行
renv::restore()
。 renv 下载了锁定文件中记录的软件包:
> renv::restore()
The following package(s) will be updated:
# CRAN -----------------------------------------------------------------------
# Since the post is too long, I put the list of installed packages here: [https://pastebin.com/QyjF9311](https://pastebin.com/QyjF9311)
Do you want to proceed? [Y/n]: y
是的,我愿意。
# Downloading packages -------------------------------------------------------
- Downloading Matrix from CRAN ... OK [file is up to date]
- Downloading mgcv from CRAN ... OK [file is up to date]
# R telling me that it successfully downloaded the other packages mentioned above...
Successfully downloaded 111 packages in 240 seconds.
这看起来效果很好,但是……
# Installing packages --------------------------------------------------------
- Installing lattice ... OK [linked from cache]
- Installing Matrix ...
我看到了这堵红线墙。我什至无法滚动回 R Studio 的最顶部,因为它的输出太长了。
^
../Core/t_cholmod_transpose.c:44:21: warning: variable 'nrow' set but not used [-Wunused-but-set-variable]
Int j, p, pend, nrow, ncol, Apacked, use_fset, fp, Fpacked, jj, permute ;
^
../Core/t_cholmod_transpose.c:44:56: warning: variable 'Fpacked' set but not used [-Wunused-but-set-variable]
Int j, p, pend, nrow, ncol, Apacked, use_fset, fp, Fpacked, jj, permute ;
# Since the post is too long, I put the most part of the error messages here: [https://pastebin.com/EEVzNRf5](https://pastebin.com/EEVzNRf5)
ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0' not found
ld: warning: search path '/opt/gfortran/lib' not found
ld: library 'gfortran' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/Users/[username]/github/nordatlantisk-ft/renv/staging/1/Matrix’
install of package 'Matrix' failed [error code 1]
我什至一开始都不理解错误消息,但这对我来说非常困惑,因为 renv 在我设置项目的计算机上运行得很好。
在那里,我刚刚得到:
> renv::status()
No issues found -- the project is in a consistent state.
我在期待什么?我希望
renv::restore()
安装锁定文件中记录的软件包,这样无论我现在使用什么计算机,我都可以使用这些脚本。
任何理解此错误的帮助以及有关如何解决此错误的任何帮助都将受到赞赏,以便我可以使用 renv,因为它应该可以工作!
致以诚挚的问候