How to Fix AlmaLinux 8 DNF Perl Module Conflicts on cPanel Servers
Troubleshooting Guide: Perl 5.26, Net-SNMP, EA-PHP SNMP and AppStream Modular Filtering
Updating an AlmaLinux 8 server can occasionally produce a confusing series of dependency errors involving Perl, net-snmp, PHP SNMP extensions and AppStream module streams.
A typical example is:
cannot install both perl-libs-4:5.32.1-473...
and perl-libs-4:5.26.3-423.el8_10.1...followed by errors such as:
net-snmp requires libperl.so.5.26and:
package ea-php83-php-snmp ... requires net-snmp,
but none of the providers can be installedThis guide explains how to diagnose the problem safely on an AlmaLinux 8/cPanel server without unnecessarily removing Perl, Net-SNMP or cPanel's EasyApache packages.
1. Understanding the Problem
The apparent problem may look like a PHP problem because the transaction reports packages such as:
ea-php82-php-snmp
ea-php83-php-snmpHowever, these packages are usually only downstream victims of the dependency conflict.
The dependency chain is approximately:
EA-PHP SNMP
│
▼
net-snmp
│
▼
libperl.so.5.26
│
▼
Perl 5.26The important requirement is:
net-snmp requires libperl.so.5.26()(64bit)Therefore, replacing the system Perl 5.26 packages with Perl 5.32 is not an appropriate first response.
2. The Critical Error
The most important part of the DNF transaction is usually similar to:
cannot install both perl-libs-4:5.32.1-473...
from appstream
and
perl-libs-4:5.26.3-423.el8_10.1...
from @SystemThe system may also report:
package perl-libs-4:5.26.3-423.el8_10.1
from baseos is filtered out by modular filteringThis indicates that DNF is attempting to resolve packages across incompatible Perl module streams.
For example, AlmaLinux 8 AppStream can expose:
perl 5.24
perl 5.26
perl 5.30
perl 5.32But a server does not normally use all of these simultaneously.
On the affected server, the correct enabled stream was:
perl 5.26 [d][e]where:
[d]= default[e]= enabled
3. Do Not Immediately Remove Perl
One of the biggest mistakes when encountering this problem is attempting to solve it by removing Perl or changing the Perl stream blindly.
For example, avoid immediately running:
dnf remove perlor:
dnf module enable perl:5.32Also avoid blindly using:
dnf update --allowerasingThe reason is that other system packages can depend on the Perl ABI currently installed.
In the affected system, net-snmp specifically required:
libperl.so.5.26Changing the system Perl stream could therefore create additional dependency problems.
4. Check the Installed Perl Packages
Start by checking the actual packages installed on the server:
rpm -q perl perl-libs net-snmpA healthy result for the affected system was:
perl-5.26.3-423.el8_10.1.x86_64
perl-libs-5.26.3-423.el8_10.1.x86_64
net-snmp-5.8-33.el8_10.x86_64This immediately tells you that the server is using the Perl 5.26 ABI required by net-snmp.
5. Check the Perl Module Stream
Next run:
dnf module list perlThe relevant section should look similar to:
Name Stream Profiles Summary
perl 5.24 common [d], minimal Practical Extraction...
perl 5.26 [d][e] common [d], minimal Practical Extraction...
perl 5.30 common [d], minimal Practical Extraction...
perl 5.32 common [d], minimal Practical Extraction...The important indicator is:
5.26 [d][e]This means Perl 5.26 is both the default and enabled stream.
If the installed system Perl is 5.26.3 and net-snmp requires libperl.so.5.26, this is the stream you generally want to preserve.
6. Refresh DNF Metadata
Before making destructive package changes, refresh the DNF metadata:
dnf makecacheThis is particularly important when the repository metadata or module metadata is temporarily inconsistent.
In the affected case, refreshing the metadata was sufficient to restore correct dependency resolution.
After the cache refresh, run:
dnf update --assumenoThe --assumeno option is useful because it resolves the transaction without actually applying it.
A clean result is:
Dependencies resolved.
Nothing to do.
Complete!This means DNF no longer has a pending transaction requiring package changes.
7. Run a Dependency Check
Once DNF resolves correctly, run:
dnf checkA healthy result should indicate that there are no dependency problems.
This is preferable to forcing package replacements simply because the original update command produced a large dependency error.
8. Why EA-PHP SNMP Appears in the Error
cPanel's EasyApache packages may contain SNMP support such as:
ea-php82-php-snmp
ea-php83-php-snmpThese packages depend on:
net-snmpThe dependency relationship looks like this:
ea-php82-php-snmp
│
▼
net-snmp
│
▼
libperl.so.5.26
│
▼
perl-libs 5.26.3Therefore, an error involving:
ea-php82-php-snmpdoes not necessarily mean the EasyApache PHP installation is broken.
The underlying issue can be the Perl module stream.
9. Understanding "Modular Filtering"
The phrase:
filtered out by modular filteringis important.
AlmaLinux 8 uses modular repositories for some packages. A package can exist in the repository but still be unavailable to DNF because the currently selected module stream filters it out.
For example, DNF may see:
perl-libs 5.26in BaseOS while simultaneously trying to resolve:
perl-libs 5.32from AppStream.
If the active module metadata does not permit the required package combination, DNF can report:
package ... is filtered out by modular filteringThis does not necessarily mean that the package is missing from the repository.
10. Safe Troubleshooting Workflow
For an AlmaLinux 8 cPanel server, a conservative troubleshooting sequence is:
Step 1 — Check installed packages
rpm -q perl perl-libs net-snmpStep 2 — Check the Perl module
dnf module list perlStep 3 — Refresh metadata
dnf makecacheStep 4 — Test dependency resolution
dnf update --assumenoStep 5 — Check installed dependencies
dnf checkOnly after these checks should you consider changing module streams or replacing packages.
11. What Not to Do
Avoid blindly executing commands such as:
dnf remove perldnf module enable perl:5.32dnf update --allowerasingdnf update --skip-brokenor:
dnf module reset perlsimply because DNF suggested them.
These options can be useful in specific situations, but they should not be the first response when the installed system Perl and its dependent packages are already consistent.
12. When dnf makecache Is Enough
Sometimes the apparent dependency conflict is caused by stale or inconsistent repository/module metadata.
In that situation:
dnf makecachefollowed by:
dnf update --assumenocan be enough.
For example, the affected server eventually reported:
Dependencies resolved.
Nothing to do.
Complete!This confirmed that there was no longer a pending dependency transaction.
13. Recommended Verification Commands
After resolving the issue, run:
rpm -q perl perl-libs net-snmpThen:
dnf module list perlThen:
dnf checkFinally:
dnf update --assumenoThe combination gives you four useful pieces of information:
| Check | Purpose |
|---|---|
rpm -q perl perl-libs net-snmp | Confirms installed versions |
dnf module list perl | Shows active Perl streams |
dnf check | Checks installed package dependencies |
dnf update --assumeno | Tests whether DNF can resolve an update |
14. Example of a Healthy Final State
A healthy system in this scenario can look like:
perl-5.26.3-423.el8_10.1.x86_64
perl-libs-5.26.3-423.el8_10.1.x86_64
net-snmp-5.8-33.el8_10.x86_64with:
perl 5.26 [d][e]and:
Dependencies resolved.
Nothing to do.
Complete!That means there is no reason to force an update or replace the Perl packages.
15. Key Lesson
The most important lesson is to identify the root dependency instead of focusing on the last package mentioned in the error.
For example:
ea-php83-php-snmp
↓
net-snmp
↓
libperl.so.5.26
↓
Perl 5.26The PHP SNMP package is therefore not necessarily the problem.
Likewise, seeing Perl 5.32 packages in AppStream does not mean that the server should be migrated to Perl 5.32.
On an AlmaLinux 8 cPanel system where installed packages depend on Perl 5.26, the first objective should be to preserve the compatible Perl 5.26 environment and restore correct DNF metadata/module resolution.
Quick Recovery Checklist
Use this checklist before making any major package changes:
# 1. Check Perl and Net-SNMP
rpm -q perl perl-libs net-snmp
# 2. Check Perl module streams
dnf module list perl
# 3. Refresh repository metadata
dnf makecache
# 4. Test update resolution without changing anything
dnf update --assumeno
# 5. Check installed dependencies
dnf checkIf the final commands report:
Dependencies resolved.
Nothing to do.
Complete!then stop there. There is no need to force package removal or replacement.
Perl dependency errors on AlmaLinux 8 can look much more serious than they actually are, particularly on cPanel servers where EasyApache PHP packages depend on system components such as net-snmp.
The safest troubleshooting approach is:
identify the installed Perl ABI → check the active module stream → refresh DNF metadata → test dependency resolution → only then consider package changes.