Menu

#2 rpy cannot find libR.so

rpy
closed
5
2019-09-13
2002-03-12
Anonymous
No

I compiled R with shared libraries, and libR.so exists
in /usr/lib/R/bin, but I still get the following error
when importing rpy in python:

ImportError: libR.so: cannot open shared object file:
No such file or directory

Using python2.2

Discussion

  • Gary Allison

    Gary Allison - 2002-03-13

    Logged In: YES
    user_id=484837

    The following suggestion from Tim Churches worked for me:
    """
    I just installed RPy on a fresh RH 7.2 system. The R
    makefile installs
    libR.so to /usr/local/lib/R/bin by default, so in your
    .bash_profile
    file (or wherever else you want to set it), add

    LD_LIBRARY_PATH=/usr/local/lib/R/bin; export LD_LIBRARY_PATH

    and log out and log back in again. Then it worked fine.
    """

     
  • Walter Moreira

    Walter Moreira - 2002-03-13

    Logged In: YES
    user_id=478949

    Setting and exporting the variable LD_LIBRARY_PATH is the best solution, I think. I will update the docs for the next release and the FAQ's in the web page.

     
  • Serge Rey

    Serge Rey - 2002-03-19

    Logged In: YES
    user_id=94064

    i ran into the same issue on debian woody/sid with
    python2.2.
    the solution for me was:
    (from the R src directory)

    make distclean
    ./configure --enable-R-shlib
    make
    make install
    edit /etc/ld.so.conf to add the line /usr/local/lib/R/bin
    ldconfig

     
  • Walter Moreira

    Walter Moreira - 2002-04-13

    Logged In: YES
    user_id=478949

    Release 0.2 contains three ways to fix this problem.

     
  • Anonymous

    Anonymous - 2012-09-06

    I have been having this problem as well, however I have not yet found a solution that works. I have installed R from source (several times, to make sure that I had the ./configure --enable-R-shlib line correct).
    I have tried adding to LD_LIBRARY_PATH, I have tried putting symbolic links to libR.so in various places, but nothing seems to work. I am however sure I have libR.so (I found one comment elsewhere on the internet that I should look for it)

    locate libR.so
    /usr/local/lib/R/bin/libR.so
    /usr/local/lib/R/lib/libR.so

    R tells me (using R.home()) that it is /usr/local/lib/R, if this is important.
    I'm running Ubuntu 12.04, python 2.7, R-2.15.1. Thanks in advance for the help!

     

    Last edit: Anonymous 2015-01-16

Anonymous
Anonymous

Add attachments
Cancel