开发者

Required JDK 1.6 rpm for x64 Redhat

I downloaded the jdk-6u21-linux-x64-rpm.bin from Sun and installed the Java. During execution the rpm which got extracted is jdk-6u21-linux-amd64.rpm.

I am trying to build an application which requires libjvm.so. And in the above JDK it is found in /usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so As a result , I am getting a compilation error as follows :

-lpegcommon -L/usr/java/jdk1.6.0_21/jre/lib/amd64/server -ljvm -ldl -lpthread -lcrypt

/usr/bin/ld: skipping incompatible /usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so when searching for -ljvm

/usr开发者_如何学运维/bin/ld: cannot find -ljvm

collect2: ld returned 1 exit status

where can I find a JDK rpm for x86_64? or an rpm where the libjvm.so is installed in

/usr/java/jdk1.6.0_21/jre/lib/x86_64/server/libjvm.so?

Thanks,


The RPM is okay.

IMHO have you checked the access rights to the path contining libjvm.so? Is it r-x for the current user?

Also can you try not mixing "-L" and "-l" switches (have all -L before any -l in your link command) 'cause gcc seems not to appreciate this mixing very much.


Since ultimately, it's an rpm you are installing, you can relocate the contents of the rpm wherever you want.

List the contents of the RPM: rpm -qpl jdk-6u21-linux-amd64.rpm, then for each base directory (/etc, /usr, \etc, \etc) you use a relocation statement. Say the RPM contains files in /etc and /usr/sbin, then to relocate /usr/sbin to /usr/local/sbin you would use rpm -i --relocate /usr/sbin=/usr/local/sbin jdk-6u21-linux-amd64.rpm.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜