HOWTO switch dnf module to default perl to version 5.24

I am using CentOS-8.4.2105 and am having issues when I execute a

dnf update

I end up with complaints about the version of perl being version mismatched. I posted a question on the CentOS Forums a few weeks ago and was making a little bit of progress with trying to resolve the issue.

The problem is the default version of perl modules is 5.26.
I executed the following command and share with CentOS Forums:

dnf module list perl

Doing so prints out a table and indicates different streams (versions) and that 5.26 is both enabled and the default. This is from fresh install.

How do I deliberately set the perl module stream to version 5.24? I know how to enable it, but that is not the same as setting it as the default.

I also used the command:

dnf module switch-to perl:5.24

That had no effect.

Thanks to anyone who understands this process.

You can do the following:

sudo dnf module reset perl
sudo dnf module enable perl:5.24

You will see some conflicts like

 Problem: module perl:5.24:8040020210602173155:162f5753-0.x86_64 conflicts with module(perl:5.26) provided by perl:5.26:8040020210601184636:9f9e2e7e-0.x86_64
  - module perl:5.26:8040020210601184636:9f9e2e7e-0.x86_64 conflicts with module(perl:5.24) provided by perl:5.24:8040020210602173155:162f5753-0.x86_64
  - module freeradius:3.0:8040020210620073944:1aedcbfe-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - conflicting requests

But that’s normal since freeradius only supports perl:5.26

Hope this helps!

Thanks Mustafa. Will that set the default version to 5.24 for perl modules?

I had already tried the sudo dnf module enable perl:5.24 and that enabled it (obviously) but did not set it as the default.

Maybe I did something incorrectly?

No problem! This will enable the perl 5.24 stream.

To sync/reinstall packages you can either do

sudo dnf distrosync --allowerasing


sudo dnf install --allowerasing perl

to reinstall the correct packages.

What you pick depends on your use case and what you want to reinstall. Hopefully that works for you!