无法加载R lapack例程

时间:2012-11-20 15:41:12

标签: r ubuntu-12.04 lapack

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

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 个答案:

答案 0 :(得分:3)

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

sudo apt-get remove revolution-mkl

解决了问题

答案 1 :(得分:2)

我使用synaptics卸载R并标记所有r-base和r-cran软件包,然后重新安装

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

就是这样,一切正常。

感谢所有评论者!

答案 2 :(得分:0)

您的mgcv套餐来自哪里? CRAN作为来源?通过迈克尔重建我的Debian软件包来CRAN作为r-cran-mgcv

在我的Ubuntu盒子上,在CRAN上使用标准的Ubuntu repo,一切都很好:

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> 

答案 3 :(得分:0)

我遇到了类似的问题,因为我只用sudo解决了它。