The error you're encountering on Red Hat Enterprise Linux (RHEL) 9.5 when running yum install htop is related to a corrupted or misconfigured DNF (Dandified YUM) configuration. This often happens due to:
/etc/dnf/dnf.conf file.Run the following command to verify if /etc/dnf/dnf.conf exists and is readable:
bashls -l /etc/dnf/dnf.conf
If it's missing or corrupted, restore it from a backup or recreate it:
bashsudo cp /usr/share/dnf/dnf.conf /etc/dnf/dnf.conf
Corrupted cache files can cause this issue. Clear the cache with:
bashsudo dnf clean all
If the issue persists, reinstall DNF:
bashsudo dnf reinstall dnf -y
Run:
bashsudo dnf check
If broken dependencies are found, fix them with:
bashsudo dnf repair
dnf Instead of yumSince RHEL 9 uses dnf as the default package manager, try:
bashsudo dnf install htop
If SELinux is enforcing, it might block DNF operations. Temporarily set it to permissive mode to test:
bashsudo setenforce 0
Then retry the installation. If it works, adjust SELinux policies:
bashsudo ausearch -c 'dnf' --raw | audit2allow -M my-dnf sudo semodule -i my-dnf.pp
DNF relies on Python. Ensure Python 3.9 and required libraries are intact:
bashsudo dnf reinstall python3-dnf -y
Run a filesystem check:
bashsudo fsck -f /
libdnfIf the error persists, reinstall libdnf:
bashsudo dnf reinstall libdnf -y
After applying the fixes, test with:
bashsudo dnf install htop
If the issue persists, check /var/log/dnf.log or /var/log/messages for detailed errors.
Le Chat can make mistakes. Check answers. Learn more