Closed shobhitsharma closed 10 years ago
Does /jre/lib/i386/server/libjvm.so exist? If not check your JAVA_HOME variable and check where libjvm.so lives.
I reverified my root path for Java sdk. Now it returned this trace:
make: Entering directory `/var/www/xmpp-chat/node_modules/java/build'
make: *** No rule to make target `/usr/lib/jvm/java-7-openjdk-i386/include/jni.h', needed by `build/depsVerified'. Stop.
make: Leaving directory `/var/www/xmpp-chat/node_modules/java/build'
What package of java is more likely compatible 1.6 or 1.7?
This same issue just cropped up for me as well. It appears that for some reason the make build is trying to reference a path that doesn't exist:
[exec] make: *\ No rule to make target /x/re/jdk1.6.0_16/jre/lib/amd64/server/libjvm.so', needed by
build/depsVerified'. Stop.
the "amd64" directory does not exist. The libjvm.so is under "i386/server" instead.
I too faced the same issue. The comment is kind of vote up for the issue. :+1:
Ok this is how i got it working on my mac, finally phew !
Same problem on Intel based Ubuntu 12.04 64 bit.
Problem seems to be that finding.gyp doesn't find a value for JAVA_HOME even tho it is defined and exported to child processes.
Trying Ajeet's solution but have no experience with building npm modules. Forked the repo into my node_modules folder and modified finding.gyp, but 'npm install java' doesn't seem to see my modifications - is there another way to directly build the forked repo?
This is how I got it done :
~/mycode/ : Where I have my server.js file ~/mycode/clonecode : Where I did git clone
cd ~/mycode/ sudo npm -g install clonecode
Btw, dont bother. The code gives bunch of other error when it is compiled, and I lost patience to fix it instead of coding functionality ....
@oneHappyCanuck cd into the node_modules/java directory and type "npm install" if you want better logging you can also try "node-gyp configure build" (if node-gyp is not installed globally you will need to run "sudo npm install -g node-gyp")
@grawk @oneHappyCanuck @Ajeet-Ganga @ShobhitSharma Can you clone my fork locally and try building that? Here's the URL: https://github.com/jsdevel/node-java.git
I currently have PR for issue #94 open and I believe it will solve issues like this.
got this error too
@adamramadhan What version of node-java are you using? What is the output of uname -a
and what distro are you using?
I'm encountering this error when trying to install node-java 0.2.9 on Amazon Linux AMI 2013.09.2 via EC2.
make: *** No rule to make target `/jre/lib/amd64/server/libjvm.so', needed by `build/depsVerified'. Stop.
When I enter echo $JAVA_HOME this is returned:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/
Does anyone know how to fix this? I'm fairly new this side of things and don't really know what I'm doing.
@neurotech, thanks for posting. Can you paste the output of the following commands?
uname -a
find /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 -type d
ls -al /usr/lib/jvm
@jsdevel Sure:
uname -a
Linux ip-10-250-18-5 3.4.73-64.112.amzn1.x86_64 #1 SMP Tue Dec 10 01:50:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
find /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 -type d
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/native_threads
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/headless
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/xawt
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/jli
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/security
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/management
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/im
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/cmm
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/ext
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Indian
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Australia
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Asia
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Pacific
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Antarctica
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/SystemV
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Etc
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Atlantic
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/America
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/America/Argentina
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/America/North_Dakota
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/America/Indiana
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/America/Kentucky
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Africa
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/zi/Europe
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/images
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/images/cursors
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/applet
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin
ls -al /usr/lib/jvm
total 16
drwxr-xr-x 4 root root 4096 Mar 9 06:04 .
dr-xr-xr-x 14 root root 4096 Mar 9 05:22 ..
drwxr-xr-x 3 root root 4096 Feb 3 22:01 java-1.6.0-openjdk-1.6.0.0.x86_64
drwxr-xr-x 3 root root 4096 Mar 9 05:58 java-1.7.0-openjdk-1.7.0.51.x86_64
lrwxrwxrwx 1 root root 21 Mar 9 06:04 jre -> /etc/alternatives/jre
lrwxrwxrwx 1 root root 27 Mar 9 05:19 jre-1.6.0 -> /etc/alternatives/jre_1.6.0
lrwxrwxrwx 1 root root 37 Mar 9 05:19 jre-1.6.0-openjdk.x86_64 -> java-1.6.0-openjdk-1.6.0.0.x86_64/jre
lrwxrwxrwx 1 root root 27 Mar 9 05:58 jre-1.7.0 -> /etc/alternatives/jre_1.7.0
lrwxrwxrwx 1 root root 38 Mar 9 05:58 jre-1.7.0-openjdk.x86_64 -> java-1.7.0-openjdk-1.7.0.51.x86_64/jre
lrwxrwxrwx 1 root root 29 Mar 9 05:58 jre-openjdk -> /etc/alternatives/jre_openjdk
@neurotech I have a feeling openjdk is misleading. Can you check and see if the JDK is installed? I think the name openjdk is causing many to assume that the JDK is installed when it's not.
Forgive me - how do I check to see if the JDK is installed?
Take a look at http://openjdk.java.net/install/ you want the openjdk-7-jdk package.
@joeferner thanks.
I literally just finished implementing the steps outlined here: http://websitenotebook.blogspot.com.au/2013/09/install-oracle-java-jdk-on-amazon-linux.html
and here: https://gist.github.com/tankchintan/1335220
node-java now installs perfectly on Amazon Linux AMI!
@ShobhitSharma can you try with latest?
@ShobhitSharma I'm going to close this out for now. If this still affects you please reopen. Thanks!
I'm still getting the error on my EC2 instance:
$ sudo npm install java
npm http GET https://registry.npmjs.org/java
npm http 200 https://registry.npmjs.org/java
> java@0.2.9 install /home/ubuntu/test/node_modules/java
> node-gyp rebuild
make: Entering directory `/home/ubuntu/test/node_modules/java/build'
make: *** No rule to make target `/jre/lib/amd64/server/libjvm.so', needed by `build/depsVerified'. Stop.
make: Leaving directory `/home/ubuntu/test/node_modules/java/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/test/node_modules/java
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 1
npm ERR! not ok code 0
$ java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
$ cat /etc/issue
Ubuntu 14.04 LTS \n \l
$ python --version
Python 2.7.6
Am I missing something?
@rochal it looks like you're still on node-java@0.2.9
. Can you update to the latest version?
Tried to install package but still can't use it due to following stack trace.
Any clues?