仅安装Java 11时,如何安装Cassandra 4 RPM软件包?

发布于 2025-02-01 14:16:49 字数 696 浏览 3 评论 0 原文

Cassandra 4应该与Java 11一起使用,但是当我尝试在没有Java 8的情况下安装它时,安装失败了:

error: Failed dependencies:
    jre >= 1.8.0 is needed by cassandra-4.0.4-1.noarch

如何解决这个问题? 我目前的解决方法是同时安装Java 8和Java 11,这样我就可以满足依赖项要求,并且可以使用Java 11运行Cassandra 4。但是,必须有更好的方法吗? 当然,我希望只安装Java 11。

一些额外的信息:

我使用Centos 7和Rhel 8

Cassandra rpm从

 java -version
     openjdk version "11.0.9.1" 2020-11-04 LTS
     OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1-LTS)
     OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1-LTS, mixed mode, sharing)

Cassandra 4 should work with java 11, but when I try to install it without java 8 then the installation fails:

error: Failed dependencies:
    jre >= 1.8.0 is needed by cassandra-4.0.4-1.noarch

How can I get around this?
My current workaround is to install both java 8 and java 11, that way I satisfy the dependency requirement and can run cassandra 4 with java 11. However, there must surly be a better way?
I would of course prefer to only have java 11 installed.

Some extra info:

I use CentOs 7 and RHEL 8

Cassandra rpm downloaded from https://downloads.apache.org/cassandra/redhat/40x/

 java -version
     openjdk version "11.0.9.1" 2020-11-04 LTS
     OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1-LTS)
     OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1-LTS, mixed mode, sharing)

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

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

发布评论

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

评论(1

苍景流年 2025-02-08 14:16:49

由于JRE在Java 11中不再可用():

在此版本中,不再提供JRE或Server JRE。仅提供JDK。

我们可能不需要 jre作为依赖关系在CentOS和RHEL平台上:

Requires:      jre >= 1.8.0

作为解决方法,您可以在使用 -NoDeps 选项安装RPM时覆盖依赖关系检查。例如:

$ sudo rpm --nodeps -i cassandra-4.0.4-1.noarch.rpm 

与此同时,我已经记录了 cassandra-17669 解决方案。干杯!

Since JRE is no longer available in Java 11 (JDK 11 release notes):

In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered.

we probably shouldn't require the JRE as a dependency on CentOS and RHEL platforms:

Requires:      jre >= 1.8.0

As a workaround, you can override the dependency check when installing the RPM with the --nodeps option. For example:

$ sudo rpm --nodeps -i cassandra-4.0.4-1.noarch.rpm 

In the meantime, I've logged CASSANDRA-17669 for resolution. Cheers!

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