# Installation problem with rsruby

**URL:** <https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495>\
**Category:** Ruby\
**Created:** [July 15, 2007, 9:48pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495 "2007-07-15T21:48:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 15, 2007, 9:48pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/1 "2007-07-15T21:48:18Z")

</div>

Dear all,

I am having problems installing rsruby, the bindings for the  
R statistical language.  
I am on an OpenSuSE 10.2, 64 bit system.  
It looked at first that everything in the  
installation went smoothly, ie the installation of R  
itself from binaries, and the installation of rsruby  
(I tried both the gems and the source code, successively),  
following the instructions on sciruby

[http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang](http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang) .

But when I try to run some code, as in the example provided  
on that page, I get:

/usr/local/lib/ruby/site\_ruby/1.8/x86\_64-linux/rsruby.so: libRblas.so:  
cannot open shared object file: No such file or directory -  
/usr/local/lib/ruby/site\_ruby/1.8/x86\_64-linux/rsruby.so (LoadError)  
from /usr/local/lib/ruby/site\_ruby/1.8/rsruby.rb:2  
from r001.rb:2:in `require’  
from r001.rb:2

‘ls’ tells me that the file is there…  
I have tried appending the path, setting symbolic links,  
no result.

What’s going wrong? Why don’t I see it?

Thank you for your help!

Best regards,

Axel  
.  
went smoothly, i.e., installation of  
binary packages of R, then

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 15, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/2 "2007-07-15T22:00:18Z")

</div>

Axel E. wrote:

> ‘ls’ tells me that the file is there…  
> I have tried appending the path, setting symbolic links,  
> no result.
> 
> What’s going wrong? Why don’t I see it?

I hate this message. It’s very confusing. The loader is complaining that  
it has loaded rsruby.so, but rsruby.so needs libRblas.so and the loader  
can’t find libRblas.so.

Probably you have installed libRblas.so in /usr/local/lib. Make sure you  
have /usr/local/lib (or whatever directory libRblas.so is in) in your  
LD\_LIBRARY\_PATH. Check out man ld.so(8) for more information about  
LD\_LIBRARY\_PATH.

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 15, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/3 "2007-07-15T22:37:20Z")

</div>

Dear Tim,

> ‘ls’ tells me that the file is there…  
> have /usr/local/lib (or whatever directory libRblas.so is in) in your  
> LD\_LIBRARY\_PATH. Check out man ld.so(8) for more information about  
> LD\_LIBRARY\_PATH.

Thank you for your reply. I have libRblas.so installed in  
/usr/lib64/R/lib and tried setting  
LD\_LIBRARY\_PATH to this directory and then also appended it to  
/usr/local/lib, just in  
case … but this didn’t work … I am still getting the same error.  
Also, I came across some warning against setting LD\_LIBRARY\_PATH at all:

[http://linuxmafia.com/faq/Admin/ld-lib-path.html](http://linuxmafia.com/faq/Admin/ld-lib-path.html)

But I’d be prepared to do many things to get R and Ruby to work together  
;-(

What else could I do ?

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 15, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/4 "2007-07-15T22:47:21Z")

</div>

Axel E. wrote:

> Thank you for your reply. I have libRblas.so installed in  
> /usr/lib64/R/lib and tried setting  
> LD\_LIBRARY\_PATH to this directory and then also appended it to /usr/local/lib, just in  
> case … but this didn’t work … I am still getting the same error.

Try using ldd to see where rsruby.so thinks libRblas.so is:

ldd rsruby.so

> Also, I came across some warning against setting LD\_LIBRARY\_PATH at all:
> 
> [Should I set LD\_LIBRARY\_PATH?](http://linuxmafia.com/faq/Admin/ld-lib-path.html)

What can I say? I’ve gotten different advice. I guess you get to make  
your own choice.

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 16, 2007, 11:30pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/5 "2007-07-16T23:30:20Z")

</div>

Axel E. wrote:

> How can I make a dynamic dependency between libRblas.so and rsruby.so ?  
> I couldn’t find any documentation on flags at the time of installation.

I don’t know. Probably you’re going to need to get in touch with the  
rsruby developers.

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 16, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/6 "2007-07-16T16:16:26Z")

</div>

Dear Tim,

thanks again for replying.  
This is what i get:

dhcppc1:/usr/local/lib/ruby/site\_ruby/1.8/x86\_64-linux # ldd -d  
rsruby.so  
undefined symbol: rb\_eRuntimeError (./rsruby.so)  
undefined symbol: rb\_eNoMethodError (./rsruby.so)  
undefined symbol: rb\_eArgError (./rsruby.so)  
undefined symbol: rb\_cObject (./rsruby.so)  
libR.so =\> /usr/lib64/R/lib/libR.so (0x00002b1d9fbc7000)  
libdl.so.2 =\> /lib64/libdl.so.2 (0x00002b1da017f000)  
libcrypt.so.1 =\> /lib64/libcrypt.so.1 (0x00002b1da0383000)  
libm.so.6 =\> /lib64/libm.so.6 (0x00002b1da05bd000)  
libc.so.6 =\> /lib64/libc.so.6 (0x00002b1da0813000)  
\*\*\* libRblas.so =\> /usr/lib64/R/lib/libRblas.so  
(0x00002b1da0b55000)  
libgfortran.so.1 =\> /usr/lib64/libgfortran.so.1  
(0x00002b1da0da8000)  
libgcc\_s.so.1 =\> /lib64/libgcc\_s.so.1 (0x00002b1da103f000)  
libreadline.so.5 =\> /lib64/libreadline.so.5 (0x00002b1da124d000)  
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)  
libncurses.so.5 =\> /lib64/libncurses.so.5 (0x00002b1da148c000)

axel@dhcppc1:/usr/lib64/R/lib\> ldd -d libRblas.so  
libc.so.6 =\> /lib64/libc.so.6 (0x00002b0b54305000)  
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

at first, libRblas.so was not found in the line marked with (\*\*\*), but  
I managed to get it found by passing it as an option in the installation  
process.

How can I make a dynamic dependency between libRblas.so and rsruby.so ?  
I couldn’t find any documentation on flags at the time of installation.

Thanks for your help again.

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 17, 2007, 3:39am UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/7 "2007-07-17T03:39:41Z")

</div>

Alex G. wrote:

> 

I just installed it from the Gem repository on Gentoo Linux with no  
problems, once I set R\_HOME=/usr/lib/R. Gentoo builds all three of (in  
/usr/lib/R/lib) libRblas.so, libRlapack.so and libR.so, and everything  
worked. I don’t remember what Ubuntu/Debian do, but quite a bit of CRAN  
is in the Debian repositories thanks to Dirk Eddelbuettel.

I usually build R from source on everything but Gentoo (where it’s built  
from source by default) and Windows (where building R from source  
requires a finicky and demanding tool set and patience I don’t possess)  
anyhow, so I know where everything is and can specify that everything I  
need gets built.

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [July 17, 2007, 3:17am UTC](https://www.ruby-forum.com/t/installation-problem-with-rsruby/109495/8 "2007-07-17T03:17:39Z")

</div>

On 17 Jul 2007, at 06:29, Tim H. wrote:

> Axel E. wrote:
> 
> > How can I make a dynamic dependency between libRblas.so and  
> > rsruby.so ?  
> > I couldn’t find any documentation on flags at the time of  
> > installation.
> 
> I don’t know. Probably you’re going to need to get in touch with  
> the rsruby developers.

Hi Axel,

I’m the developer of RSRuby, sorry to see you’ve been having trouble.  
I don’t seem to have libRblas.so on my machine (Ubuntu), so I’m not  
sure what is causing the issue you’re having. What version of R (and  
RSRuby) did you install? Feel free to email me off-list if you like -  
though I am away from work for the next week so replies may be slow.

Alex G.

Bioinformatics Center  
Kyoto University
