如何在 Amazon Linux 2 上安装 jarsigner?
我的理解是,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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
亚马逊似乎遵循 RedHat 打包方案,将 JRE 和 JDK 分开,就像 Sun/Oracle 过去所做的那样(JRE 分为 GUI 和“无头”,对您来说不是问题):
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):
sudo yum install java-11-openjdk-devel
should do it.