# Unable to install dnf module javapackages-tools

**URL:** <https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722>\
**Category:** Rocky Linux Help & Support\
**Created:** [February 2, 2024, 4:36pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722 "2024-02-02T16:36:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![automaticbuffalo](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@automaticbuffalo](https://forums.rockylinux.org/u/automaticbuffalo)\
**Post date:** [February 2, 2024, 4:36pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722/1 "2024-02-02T16:36:55Z")

</div>

I have set up a local repo for rocky 9 and there are multiple versions of java in the appstream/Pakages/j directory but it will only show java 11 if you want to install java.

I ran this: dnf install javapackages-tools  
I tried: dnf module enable javapackages-tools but it returns the following:

Last metadata expiration check: 0:24:01 ago on Fri 02 Feb 2024 04:08:58 PM UTC.  
Error: Problems in request:  
missing groups or modules: javapackages-tools

It does not show in “dnf modules list”

I have searched on the error in quotes on google and the results said to install the rpm that I already installed and to run the command I posted. I also us AI to create a script to install and enable the module but it only returned the same commands I already attempted.

What else should I be attempting to do to either install/enable the module or troubleshoot it further?

Thank you.

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [February 2, 2024, 5:54pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722/2 "2024-02-02T17:54:26Z")

</div>

> [@automaticbuffalo](#):
>
> but it will only show java 11 if you want to install java

Can you show an example of this?

> [@automaticbuffalo](#):
>
> Last metadata expiration check: 0:24:01 ago on Fri 02 Feb 2024 04:08:58 PM UTC.  
> Error: Problems in request:  
> missing groups or modules: javapackages-tools
> 
> It does not show in “dnf modules list”

javapackages-tools (the module) is not exposed in our repos. It is strictly a build requirement for maven. Is there something you need from the javapackages-tools module that you can’t get otherwise in the repos?

---

<div class="post-metadata">

**Author:** ![automaticbuffalo](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@automaticbuffalo](https://forums.rockylinux.org/u/automaticbuffalo)\
**Post date:** [February 2, 2024, 5:59pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722/3 "2024-02-02T17:59:50Z")

</div>

I want to be able to install java 21 which is in the repo but any dnf calls to the repo say it doesn’t exist.

dnf install java will offer java 11  
dnf install java-21-openjdk returns:

No match for argument: java-21-openjdk

Error: Unable to find a match: java-21-openjdk

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [February 2, 2024, 7:01pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722/4 "2024-02-02T19:01:57Z")

</div>

I am unsure how you synced the repos. Asking dnf to install java-21-openjdk works as intended for me.

```auto
[label@xmpp01 ~]$ sudo dnf install java-21-openjdk --assumeno
Last metadata expiration check: 2:35:41 ago on Fri 02 Feb 2024 09:21:39 AM MST.
Dependencies resolved.
================================================================================ Package Arch Version Repo Size
================================================================================Installing:
 java-21-openjdk x86_64 1:21.0.2.0.13-1.el9 appstream 446 k
. . .

```

Ensure that you’re only using `dnf reposync` and not running createrepo after for your local repos. Javapackage-tools is also not required to install java 21.

---

<div class="post-metadata">

**Author:** ![automaticbuffalo](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@automaticbuffalo](https://forums.rockylinux.org/u/automaticbuffalo)\
**Post date:** [February 2, 2024, 7:35pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722/5 "2024-02-02T19:35:28Z")

</div>

Thank you.

I did clean up some old directories and re-created the repo and then used the explicit java-21-openjdk and was able to download it.

Is there a way to get it so

dnf provides java

We are new to rocky so I think people want to be able to type “dnf provides java” and see all possible versions but what I read makes it sound like the module only shows the default.

Is there a way to see all the options in the repo using a dnf command?

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [February 2, 2024, 11:55pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722/6 "2024-02-02T23:55:17Z")

</div>

Modules do not have any effect over java or related packages. java-11-openjdk by default provides “java”, so running `dnf provides java` will only show you that version. “Provides” is from the package itself. If you are wanting java-21-openjdk, you would need to specify this when running dnf install.

If you want to see a list, `dnf search java*` or `dnf search java | grep jdk`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [April 2, 2024, 11:55pm UTC](https://forums.rockylinux.org/t/unable-to-install-dnf-module-javapackages-tools/12722/7 "2024-04-02T23:55:20Z")

</div>

Closed on April 2, 2024, 11:55pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
