don't add the library, just the path to it:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/R/lib/
Robert
________________________________
From: David Montgomery [mailto:dmontgom...@brandscreen.com]
Sent: Wednesday, 9 March 2011 3:46 PM
To: Denham Robert
Cc: RPy help,support and design discussion list
Subject: Re: [Rpy] ImportError: libR.so: cannot open shared
object file: No suchfile or directory
Hi,
Below is what I did in Ubuntu to no avail.
locate libR.so
/usr/lib/R/lib/libR.so
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/R/lib/libR.so
python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import rpy2.robjects as robjects
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python2.6/dist-packages/rpy2-2.1.5_20100929-py2.6-linux-
i686.egg/rpy2/robjects/__init__.py", line 14, in <module>
import rpy2.rinterface as rinterface
File
"/usr/local/lib/python2.6/dist-packages/rpy2-2.1.5_20100929-py2.6-linux-
i686.egg/rpy2/rinterface/__init__.py", line 75, in <module>
from rpy2.rinterface.rinterface import *
ImportError: libR.so: cannot open shared object file: No such
file or directory
On Wed, Mar 9, 2011 at 4:39 PM, Denham Robert
<robert.den...@derm.qld.gov.au> wrote:
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