4

我通常使用像 gam() lm() 等使用 lapack 的例程在 R 中运行不同的统计分析,但是在多次更新库后出现以下错误:

library(mgcv)
This is mgcv 1.7-22. For overview type 'help("mgcv-package")'.
model <- with(chlaR,gam(ClorMAX ~ s(DegDay_NM)))
Error en eigen(St, symmetric = TRUE) : 
lapack routines  cannot be loaded
Además: Mensajes de aviso perdidos
In eigen(St, symmetric = TRUE) :
  unable to load shared object '/usr/lib/R/modules//lapack.so':
  /usr/lib/R/modules//lapack.so: undefined symbol: dpstrf_

版本信息为:

platform       i686-pc-linux-gnu            
arch           i686                         
os             linux-gnu                    
system         i686, linux-gnu              
status                                      
major          2                            
minor          15.2                         
year           2012                         
month          10                           
day            26                           
svn rev        61015                        
language       R             

我正在使用 Ubuntu 12.04.1 LTS

更新:我检查了 lapack.so 库

leonardo@LyP:~$ ldd  /usr/lib/R/modules/lapack.so
linux-gate.so.1 =>  (0x009ec000)
libR.so => /usr/lib/libR.so (0x0023a000)
liblapack.so.3gf => /usr/lib/liblapack.so.3gf (0x00ba3000)
libblas.so.3gf => /usr/lib/libblas.so.3gf (0x00186000)
...

检查对象

leonardo@LyP:~$ R CMD objdump -T /usr/lib/liblapack.so.3gf|grep dpstrf
00327f10 g    DF .text  000024d4  Base        dpstrf_

R CMD ldd /usr/lib/R/modules/lapack.so
linux-gate.so.1 =>  (0x009f5000)
libR.so => /usr/lib/R/lib/libR.so (0x00110000)
liblapack.so.3gf => /usr/lib/R/lib/liblapack.so.3gf (0x009f6000)
libblas.so.3gf => /usr/lib/R/lib/libblas.so.3gf (0x11eef000)

R 链接到另一个库并搜索对象:

leonardo@LyP:~$ R CMD objdump -T /usr/lib/R/lib/liblapack.so.3gf|grep dpstrf

给空

有任何想法吗?

4

4 回答 4

3

我有同样的问题,我跟踪它与革命 mkl 包的冲突

sudo apt-get remove revolution-mkl

解决了问题

于 2012-12-10T15:11:01.523 回答
2

我使用突触卸载 R 并标记所有 r-base 和 r-cran 包,重新安装它

sudo apt-get install r-base r-base-dev r-base-html

就是这样,一切正常。

感谢所有的评论者!

于 2012-11-25T16:13:52.280 回答
0

你的mgcv包裹是从哪里来的?CRAN 作为来源?CRAN 作为r-cran-mgcv通过迈克尔重建我的 Debian 软件包的方式?

在我的 Ubuntu 机器上,使用 CRAN 上的标准 Ubuntu 存储库,一切都很好:

edd@max:~$ ldd /usr/lib/R/library/mgcv/libs/mgcv.so 
        linux-vdso.so.1 =>  (0x00007ffff43ff000)
        liblapack.so.3gf => /usr/lib/liblapack.so.3gf (0x00007f0374f75000)
        libblas.so.3gf => /usr/lib/libblas.so.3gf (0x00007f0373ad6000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f03737d9000)
        libR.so => /usr/lib/libR.so (0x00007f0373215000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0372e56000)
        libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f0372b3e000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0372928000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f037270b000)
        libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007f03724c8000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f037228b000)
        liblzma.so.5 => /usr/lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f0372069000)
        libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f0371e58000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0371c41000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0371a39000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0371834000)
        libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f0371626000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0375de2000)
        libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f03713f0000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f03711c8000)
edd@max:~$ 

edd@max:~$ R

R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

R> library(mgcv)
This is mgcv 1.7-22. For overview type 'help("mgcv-package")'.
R> 
于 2012-11-20T21:52:55.590 回答
0

我有一个类似的问题,因为我只用 sudo 开始 R 解决了它。

于 2018-05-15T14:31:51.007 回答