zs2020
zs2020

Reputation: 54524

Error when start the r-node

I got this error when I started the r-node server:

./run-server.sh 

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: libR.so: cannot open shared object file: No such file or directory
    at Object..node (module.js:416:11)
    at Module.load (module.js:336:31)
    at Function._load (module.js:297:12)
    at require (module.js:348:19)
    at Object.<anonymous> (/home/ubuntu/software/r-node-v0.1.1/server/rserve.js:21:15)
    at Module._compile (module.js:404:26)
    at Object..js (module.js:410:10)
    at Module.load (module.js:336:31)
    at Function._load (module.js:297:12)
    at require (module.js:348:19)

I installed the nodejs and just followed the steps. I also searched for libR.so, which located in /usr/lib/R/lib and I add this to the system path, but r-node server still could not find it.

Any idea?

Upvotes: 0

Views: 650

Answers (1)

Dirk is no longer here
Dirk is no longer here

Reputation: 368261

Make sure /usr/lib/R/lib/ is known to the program running this.

When you run R itself, it adds this to LD_LIBRARY_PATH in the script /usr/bin/R. You need to do this too, and possible ways to set it are

  • via a one-line file in /etc/ld.so.conf.d/

  • via /etc/ld.so.conf

  • via LD_LIBRARY_PATH

Upvotes: 1

Related Questions