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