x64 Redhat 所需的 JDK 1.6 rpm

发布于 2024-09-18 01:01:43 字数 567 浏览 6 评论 0原文

我从Sun下载了jdk-6u21-linux-x64-rpm.bin并安装了Java。在执行过程中,提取的 rpm 是 jdk-6u21-linux-amd64.rpm。

我正在尝试构建一个需要 libjvm.so 的应用程序。在上面的JDK中,它位于/usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so 结果,我收到如下编译错误:

-lpegcommon -L/usr/java/jdk1.6.0_21/jre/lib/amd64/server -ljvm -ldl -lpthread -lcrypt
/usr/bin/ld:搜索 -ljvm 时跳过不兼容的 /usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so
/usr/bin/ld: 找不到 -ljvm
collect2: ld 返回 1 退出状态

在哪里可以找到 x86_64 的 JDK rpm?或安装了 libjvm.so 的 rpm
/usr/java/jdk1.6.0_21/jre/lib/x86_64/server/libjvm.so?

谢谢,

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,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温暖的光 2024-09-25 01:01:43

转速还可以。

恕我直言,您检查过包含 libjvm.so 的路径的访问权限吗?是当前用户的rx吗?

另外,您可以尝试不混合“-L”和“-l”开关(在链接命令中的任何-l之前都包含所有-L),因为gcc似乎不太喜欢这种混合。

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.

勿忘初心 2024-09-25 01:01:43

由于最终您要安装的是 rpm,因此您可以将 rpm 的内容重新定位到您想要的任何位置。

列出 RPM 的内容:rpm -qpl jdk-6u21-linux-amd64.rpm,然后对于每个基本目录(/etc、/usr、\etc、\etc)使用重定位语句。假设 RPM 包含 /etc 和 /usr/sbin 中的文件,那么要将 /usr/sbin 重新定位到 /usr/local/sbin,您可以使用 rpm -i --relocate /usr/sbin=/usr/local/ sbin jdk-6u21-linux-amd64.rpm。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文