如何在 Amazon Linux 2 上安装 jarsigner?

发布于 2025-01-10 14:14:06 字数 1277 浏览 1 评论 0原文

我的理解是,jarsigner 是与 OpenJDK 一起打包的,我是通过运行安装的

sudo amazon-linux-extras install java-openjdk11

现在我有一堆指向 jdk 的 Synlinks,如下所示:

$ ll /etc/alternatives/jre*
lrwxrwxrwx 1 root root 60 Feb 16 01:00 /etc/alternatives/jre -> /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64
lrwxrwxrwx 1 root root 60 Feb 16 01:00 /etc/alternatives/jre_11 -> /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64
lrwxrwxrwx 1 root root 59 Feb 16 01:00 /etc/alternatives/jre_11_openjdk -> /usr/lib/jvm/jre-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64
lrwxrwxrwx 1 root root 60 Feb 16 01:00 /etc/alternatives/jre_openjdk -> /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64

但是,我在 bin 目录中没有 jarsigner:

$ ll /etc/alternatives/jre/bin
total 656
-rwxr-xr-x 1 root root  71368 Dec 17 12:16 alt-java
-rwxr-xr-x 1 root root  71360 Dec 17 12:16 java
-rwxr-xr-x 1 root root  71392 Dec 17 12:16 jjs
-rwxr-xr-x 1 root root  71384 Dec 17 12:16 keytool
-rwxr-xr-x 1 root root  71384 Dec 17 12:16 pack200
-rwxr-xr-x 1 root root  71376 Dec 17 12:16 rmid
-rwxr-xr-x 1 root root  71384 Dec 17 12:16 rmiregistry
-rwxr-xr-x 1 root root 152440 Dec 17 12:16 unpack200

我还需要什么安装这个二进制文件做什么?

My understanding is that jarsigner is packaged with OpenJDK, which I've installed by running

sudo amazon-linux-extras install java-openjdk11

Now I have a bunch of synlinks to the jdk, like so:

$ ll /etc/alternatives/jre*
lrwxrwxrwx 1 root root 60 Feb 16 01:00 /etc/alternatives/jre -> /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64
lrwxrwxrwx 1 root root 60 Feb 16 01:00 /etc/alternatives/jre_11 -> /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64
lrwxrwxrwx 1 root root 59 Feb 16 01:00 /etc/alternatives/jre_11_openjdk -> /usr/lib/jvm/jre-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64
lrwxrwxrwx 1 root root 60 Feb 16 01:00 /etc/alternatives/jre_openjdk -> /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.amzn2.0.3.aarch64

However, I don't have jarsigner in the bin directory:

$ ll /etc/alternatives/jre/bin
total 656
-rwxr-xr-x 1 root root  71368 Dec 17 12:16 alt-java
-rwxr-xr-x 1 root root  71360 Dec 17 12:16 java
-rwxr-xr-x 1 root root  71392 Dec 17 12:16 jjs
-rwxr-xr-x 1 root root  71384 Dec 17 12:16 keytool
-rwxr-xr-x 1 root root  71384 Dec 17 12:16 pack200
-rwxr-xr-x 1 root root  71376 Dec 17 12:16 rmid
-rwxr-xr-x 1 root root  71384 Dec 17 12:16 rmiregistry
-rwxr-xr-x 1 root root 152440 Dec 17 12:16 unpack200

What else do I need to do to install this binary?

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

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

发布评论

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

评论(1

压抑⊿情绪 2025-01-17 14:14:06

亚马逊似乎遵循 RedHat 打包方案,将 JRE 和 JDK 分开,就像 Sun/Oracle 过去所做的那样(JRE 分为 GUI 和“无头”,对您来说不是问题):

$ yum list 'java-11-openjdk*'
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
java-11-openjdk.x86_64                   1:11.0.13.0.8-1.amzn2.0.3 @amzn2extra-java-openjdk11
java-11-openjdk-headless.x86_64          1:11.0.13.0.8-1.amzn2.0.3 @amzn2extra-java-openjdk11
Available Packages
java-11-openjdk-debug.x86_64             1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-demo.x86_64              1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-demo-debug.x86_64        1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-devel.x86_64             1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-devel-debug.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-headless-debug.x86_64    1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc.x86_64           1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc-debug.x86_64     1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc-zip.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc-zip-debug.x86_64 1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-jmods.x86_64             1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-jmods-debug.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-src.x86_64               1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-src-debug.x86_64         1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-static-libs.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-static-libs-debug.x86_64 1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11

sudo yum install java-11-openjdk -devel 应该可以做到。

It appears Amazon follows the RedHat packaging scheme with JRE and JDK separated, as Sun/Oracle used to (and the JRE split into GUI and 'headless', not an issue for you):

$ yum list 'java-11-openjdk*'
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
java-11-openjdk.x86_64                   1:11.0.13.0.8-1.amzn2.0.3 @amzn2extra-java-openjdk11
java-11-openjdk-headless.x86_64          1:11.0.13.0.8-1.amzn2.0.3 @amzn2extra-java-openjdk11
Available Packages
java-11-openjdk-debug.x86_64             1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-demo.x86_64              1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-demo-debug.x86_64        1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-devel.x86_64             1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-devel-debug.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-headless-debug.x86_64    1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc.x86_64           1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc-debug.x86_64     1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc-zip.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-javadoc-zip-debug.x86_64 1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-jmods.x86_64             1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-jmods-debug.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-src.x86_64               1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-src-debug.x86_64         1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-static-libs.x86_64       1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11
java-11-openjdk-static-libs-debug.x86_64 1:11.0.13.0.8-1.amzn2.0.3 amzn2extra-java-openjdk11

sudo yum install java-11-openjdk-devel should do it.

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