1

设置:R 版本 4.0.5(2021-03-31)-“摇晃和扔”平台:x86_64-pc-linux-gnu(64 位)Ubuntu 16.04

问题:无法安装 phylosmith 软件包。命令:devtools::install_github('schuyler-smith/phylosmith', lib = "/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/")

输出:

Downloading GitHub repo schuyler-smith/phylosmith@HEAD
✓  checking for file ‘/tmp/RtmpOU4qAW/remotes570e65639b36/schuyler-smith-phylosmith-2bd9c9b/DESCRIPTION’ ...
─  preparing ‘phylosmith’:
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘phylosmith_1.0.5.tar.gz’
   
* installing *source* package ‘phylosmith’ ...
** using staged installation
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -std=gnu++11 accepts -g... (cached) yes
checking whether g++ version is sufficient... (5.4.0) yes
checking for macOS... not found as on Linux
checking for OpenMP... found
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppParallel/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppArmadillo/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppProgress/include'   -I../inst/include -fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppParallel/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppArmadillo/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppProgress/include'   -I../inst/include -fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c correlations_Rcpp.cpp -o correlations_Rcpp.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o phylosmith.so RcppExports.o correlations_Rcpp.o -fopenmp -DARMA_64BIT_WORD -L/usr/lib/R/lib -lR
installing to /home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-phylosmith/00new/phylosmith/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘phylosmith’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-phylosmith/00new/phylosmith/libs/phylosmith.so':
  /home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-phylosmith/00new/phylosmith/libs/phylosmith.so: undefined symbol: _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/phylosmith’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpOU4qAW/file570e27910aa/phylosmith_1.0.5.tar.gz’ had non-zero exit status'

附加信息:我看过其他类似问题的帖子,但未定义符号不同。我相信这个错误是特定于我给定的未定义符号(_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE),但我不确定这与它有什么关系或如何解决它。

我尝试过更改库并直接从 .tar.gz 文件安装它。我有 GDAL 版本 2.2.2,我认为它也是我唯一的安装。

我什至尝试在完成安装之前复制 finsihed 文件夹,并将其粘贴到库中。包文件夹看起来很完整。然后,当我运行命令时library(phylosmith),我得到输出:

Error: package or namespace load failed for ‘phylosmith’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/phylosmith/libs/phylosmith.so':
  /home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/phylosmith/libs/phylosmith.so: undefined symbol: _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE

我还按照指示事先运行了 linux 命令:

sudo apt install libmysqlclient-dev libgdal-dev libudunits2-dev

我使用终端命令apt install libtbb-dev和 R 中的 TBB 包安装了 TBB devtools::install_package("jjallaire/TBB")。即使在重新启动 Linux 和 RStudio 后,也没有尝试更改错误输出。

在这一点上,我知道它必须与 .so 文件中包含 tbb 的符号有关。任何帮助故障排除将不胜感激!

4

1 回答 1

0

作者修复了!Phylosmith 现在应该可以在 Linux 上安装没问题了。有关详细信息,请参阅 github.com/schuyler-smith/phylosmith/issues/15。

于 2021-04-20T15:04:08.453 回答