Error: libjvm.so: cannot open shared object file: No such file or directory
This happens on Heroku when load up the node-jdbc plugin which depends on this plugin. Full error is this:
Error: libjvm.so: cannot open shared object file: No such file or directory
remote: at Error (native)
remote: at Object.Module._extensions..node (module.js:440:18)
remote: at Module.load (module.js:357:32)
remote: at Function.Module._load (module.js:314:12)
remote: at Module.require (module.js:367:17)
remote: at require (internal/module.js:16:19)
remote: at Object.
I posted this issue with a link to this page on stackoverflow as well http://stackoverflow.com/questions/36191073/node-java-error-libjvm-so-cannot-open-shared-object-file-no-such-file-or-dire
I figured it out and it's nothing to do with anything in joe's code. My badd
@J0NNYZER0 i have the same error. can i know what did you do?
@J0NNYZER0 How can you solve this problem?
If someone is coming here now, Please try the approach below:
Steps:
- Find your R location. It will be stored in
rsession-ld-library-pathinrserver.conffile. Or just by doingwhich R. The location usually is/usr/lib64/R/libor/usr/lib64/microsoft-r/3.3/lib64/R/lib - Find the
libjvm.sofile which is usually in theusr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/serverpath depending on which jre you're using. Check in $JAVA_HOME environment. - Create a symlink using
ln -ssudo ln -s /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so /usr/lib64/microsoft-r/3.3/lib64/R/lib/libjvm.so - Restart R server
I figured it out and it's nothing to do with anything in joe's code. My badd
@J0NNYZER0 What did you do? How did you solve it?
I figured it out.
- Find where
libjvm.sois located./app/.jdk/jre/lib/amd64/serverin my case. - Add it to
LD_LIBRARY_PATHenv var. I'm adding this in starting script.
I'm seeing this problem as well. Locally on OSX, everything is working great. When I move to ubuntu, I'm seeing the 'libjvm.so: cannot open shared object file' error. I've tried setting the follow env variables as well:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
But no luck. All suggestions appreciated.
This is not a Heroku project.
node Java is not tested with openjdk.
@pi-kei You saved my day! Thanks !