I think the third option is likely to be the simplest for you.
 
First off, find where libR.so actually is. Its probably somewhere like
/usr/lib/R/lib/ but at the comand line you can type R RHOME to see the
base of this path.
At home under ubuntu, mine is in /usr/lib/R/lib/ and at work it is in
/opt/sw/R/2.11.1/lib64/R/lib. Once you have found the library, try
adding it to LD_LIBRARY_PATH. Say you found libR.so in /usr/lib/R/lib,
then
 
you@yourmachine:$ export
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/R/lib

and try running rpy2 now:

you@yourmachine:$ python
>>> import rpy2

In order for you not to have to do this everytime you want to call rpy2,
you can follow the suggestion in the error message and add this to
.bashrc (or equivalent); so assuming you use bash, just edit ~/.bashrc
and add the line:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/R/lib

to it. Then, either log out and log back in again, or 

you@yourmachin:$ source ~/.bashrc

Robert

 
 
 
 



________________________________

        From: David Montgomery [mailto:dmontgom...@brandscreen.com] 
        Sent: Wednesday, 9 March 2011 3:19 PM
        To: rpy-list@lists.sourceforge.net
        Subject: [Rpy] ImportError: libR.so: cannot open shared object
file: No suchfile or directory
        
        
        can t get rpy to work because of this
        
        ImportError: libR.so: cannot open shared object file: No such
file or directory
        
            *    make a link to R_HOME/bin/libR.so in /usr/local/lib, or
in some other location that your system knows as a standard place for
libraries; then run 'ldconfig' as root;
            *    or edit /etc/ld.so.conf to add the line 'R_HOME/bin'
and run 'ldconfig' as root;
            *    or set the environment variable LD_LIBRARY_PATH with
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH\
            *               :R_HOME/bin
            *    
in your .bashrc (or equivalent).
        
        Can someone provide more color and detail for me on how to fix
this?  This is for this users that are not systems admis...ldconfig
what?  
        
        
        
        This happens on a max os and ubuntu.
        
        
        
        
        
        



+----------------------------------------------------------------+
Think B4U Print
1 ream of paper = 6% of a tree and 5.4kg CO2 in the atmosphere
3 sheets of A4 paper = 1 litre of water
+----------------------------------------------------------------+


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to