Building R (cran) + rpy2 on ubuntu -> libRblas.so not found -


i trying build r (tried 2.14.2 , 2.15) , rpy2 (2.2.6, python 2.7.1) on ubuntu (11.04, natty narwhal), deploy custom directory (in following called /home/me/lib/r), since not have root access, need newer version available on server.

details of build etc further down, when running tests of rpy2, following error:

/home/me/lib/pythonlib/lib/python/rpy2/rinterface/__init__.py in <module>() ---> 87 rpy2.rinterface._rinterface import * importerror: librblas.so: cannot open shared object file: no such file or directory warning: failure executing file: <experiments/arrangement/test_smacof_arrange.py> 

i sure calling right rpy2 module (my custom built one) has been built against custom built r version. doing following:

  1. i first build r-base on ubuntu

    wget http://cran.r-project.org/bin/linux/ubuntu/natty/r-base_2.14.2.orig.tar.gz # untar , go directory  # enable-r-shblib flag needed rpy2 linking, enable-blas-shlib included # because hoped solve problem, doesnt change ./configure --enable-r-shlib --enable-blas-shlib --prefix=/home/me/lib/r make make install 
  2. i build rpy2 against r build

    wget http://pypi.python.org/packages/source/r/rpy2/rpy2-2.2.6.tar.gz # untar , go directory  # build rpy2, providing r-home-lib , r-home flags, , deploy custom dir python setup.py build --r-home /home/me/lib/r --r-home-lib /home/me/lib/r/lib64/r/lib install --home /home/me/lib/pythonlib 

    i have adapted pythonpath find modules in /home/me/lib/pythonlib, problem isn't there. python build returns correct configuration (note rblas appears here!)

    configuration r library: include_dirs: ('/home/me/lib/r/lib64/r/include',) libraries: ('r', 'rblas', 'rlapack') library_dirs: ('/home/me/lib/r/lib64/r/lib',) extra_link_args: () 

i have tried track down error, no end. /home/me/lib/r/lib64/r/lib contains librblas.so, there 1 thing seems strange however, librblas.so not linked correctly libr.so, not sure wether causes error, nor know how fix it.

>> ldd -d libr.so  linux-vdso.so.1 =>  (0x00007fffcec58000) librblas.so => not found libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fe63d21d000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe63cf97000) ... 

any appreciated!

for others running issue, able solve making sure add r libraries library path in bashrc:

export ld_library_path="r-install-location/lib65/r/lib:$ld_library_path" 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -