从18.04升级后,由于Ubuntu 20.04上的LAPACK而导致R包编译问题

问题描述

我已经将Ubuntu从18.04升级到20.04,现在我的某些R软件包无法编译/加载。下面是一个示例:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'myPackage' in dyn.load(file,DLLpath = DLLpath,...):
 unable to load shared object '/usr/local/lib/R/site-library/00LOCK-my_package/00new/myPackage/libs/myPackage.so':
  /usr/local/lib/R/site-library/00LOCK-my_package/00new/myPackge/libs/myPackage.so: undefined symbol: dgesvx_
Error: loading failed
Execution halted
ERROR: loading failed

这个dgesvx_看起来像是LAPACK问题(https://www.netlib.org/lapack/explore-html/d7/d3b/group__double_g_esolve_ga9d90ccf6e340cacd08b7bbbb502ceb21.html#ga9d90ccf6e340cacd08b7bbbb502ceb21)。

我在Ubuntu 20.04(3.9.0-1build1)中安装了最新的LAPACK版本。

我该怎么办才能解决问题?

我的sessionInfo()

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.2 tools_4.0.2   

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)