我正在尝试通过 R 中的 devtools 通过 Github 安装软件包:
devtools::install_github("daewoooo/SVbyEye", branch = "master")
但我不断收到错误:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/V8/libs/V8.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/V8/libs/V8.so, 0x0006): symbol not found in flat namespace '__ZNSt3__122__libcpp_verbose_abortEPKcz'
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘SVbyEye’
* removing ‘/Users/will/Library/R/arm64/4.4/library/SVbyEye’
Warning messages:
1: In i.p(...) :
installation of package ‘/var/folders/0z/42j_n0qn3yjf7rgv47rgj9d80000gn/T//RtmpRhdVn7/file90c578a88b7/SVbyEye_0.99.0.tar.gz’ had non-zero exit status
2: In devtools::install_github("daewoooo/SVbyEye", branch = "master") :
Arguments in `...` must be used.
✖ Problematic argument:
• branch = "master"
ℹ Did you misspell an argument name?
以下是我运行此程序的一些详细信息:
R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Ventura 13.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.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
编辑:看起来库路径或编译器兼容性有问题
~ % ls /Users/will/Library/R/arm64/4.4/library/V8/libs/V8.so ls: /Users/will/Library/R/arm64/4.4/library/V8/libs/V8.so: No such file or directory
~ % cat ~/.R/Makevars CXXFLAGS = -std=c++17
有人知道这里会发生什么吗?我刚刚更新了 R 和 Rstudio。
答案:MacOS sequoia 15.1.1 的更新以及 xcode 命令行工具的更新似乎可以解决问题。更新这些之后,我能够安装 V8,然后安装 SVbyEye。