安装 phylosmith 失败 - 无法加载共享对象,未定义符号

如何解决安装 phylosmith 失败 - 无法加载共享对象,未定义符号

设置: 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,...):
 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 devtools::install_package("jjallaire/TBB") 中的 TBB 包安装了 TBB。即使在重新启动 Linux 和 RStudio 后,这两种尝试都没有改变错误输出

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

解决方法

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?