2

I need this command to work:

$ dnf install postgresql12

Now it raises an error:

No match for argument: postgresql12 Error: Unable to find a match: postgresql12

However, if I specify repo, it starts working:

$ dnf --repo postgresql install postgresql12

But I need the first variant dnf install postgresql12, since I'm using Ansible dnf module, which raises the very same error as a raw command:

  • No package postgresql12 available.

So, how can I fix it?

enter image description here

Jacobian
  • 131

2 Answers2

2

I hesitate to add this as an answer because I'm not sure it's a good way to fix it.. But anyway I had the same issue and 'fixed' it by adding module_hotfixes=true in /etc/dnf/dnf.conf.

https://dnf.readthedocs.io/en/latest/conf_ref.html tells us:

module_hotfixes

boolean

Set this to True to disable module RPM filtering and make all RPMs from the repository available. The default is False. This allows user to create a repository with cherry-picked hotfixes that are included in a package set on a modular system.

I'm not sure why this works in this case, I only have dnf on some sandbox servers and never got to the bottom of it.

HoD
  • 3,522
0

You need to enable the repository, either by editing the .repo file to add enabled=1 or by running dnf config-manager --set-enabled postgresql