Common Errors Quick Reference
This page collects the most common error messages and their solutions encountered during day-to-day administration of EL systems (AlmaLinux, Rocky Linux, CentOS, etc.), organized by category for quick lookup.
Package Management Errors
Section titled “Package Management Errors””No match for argument: xxx”
Section titled “”No match for argument: xxx””The package is not in any enabled repository.
$ dnf search <keyword>$ sudo dnf install -y epel-release$ dnf search <package-name>”This command has to be run with superuser privileges”
Section titled “”This command has to be run with superuser privileges””Root privileges are required. Add sudo before the command.
$ sudo dnf install <package-name>If the user is not in the sudoers list:
$ su -# usermod -aG wheel <username>“Error: Failed to download metadata for repo ‘xxx’”
Section titled ““Error: Failed to download metadata for repo ‘xxx’””Repository metadata download failed. This may be a network issue or an expired repository URL.
$ sudo dnf clean all$ sudo dnf makecache$ cat /etc/yum.repos.d/<repo-name>.repo$ sudo dnf config-manager --set-disabled <repo-ID>For EOL CentOS 8, official repositories have been taken offline. You need to migrate to AlmaLinux or Rocky Linux.
”Error: Transaction check error: file xxx from install of yyy conflicts with file from package zzz”
Section titled “”Error: Transaction check error: file xxx from install of yyy conflicts with file from package zzz””Package file conflict.
$ sudo dnf install <package-name> --allowerasing$ rpm -ql <package1> | sort > /tmp/pkg1.txt$ rpm -ql <package2> | sort > /tmp/pkg2.txt$ comm -12 /tmp/pkg1.txt /tmp/pkg2.txt”Curl error (28): Timeout was reached”
Section titled “”Curl error (28): Timeout was reached””Download timed out. Network issue or unreachable mirror.
$ curl -I https://mirror.example.com/$ sudo sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/almalinux*.repo$ sudo sed -i 's|^# baseurl=https://repo.almalinux.org|baseurl=https://mirrors.aliyun.com|g' /etc/yum.repos.d/almalinux*.repo$ sudo dnf makecache”Protected multilib versions: xxx”
Section titled “”Protected multilib versions: xxx””The 32-bit and 64-bit versions of the same package have mismatched versions.
$ sudo dnf distro-sync <package-name>$ sudo dnf remove <package-name>.i686Service Management Errors
Section titled “Service Management Errors””Job for xxx.service failed because the control process exited with error code”
Section titled “”Job for xxx.service failed because the control process exited with error code””Service failed to start.
$ systemctl status <service-name>$ journalctl -u <service-name> -n 50 --no-pager$ nginx -t$ httpd -t”Unit xxx.service is masked”
Section titled “”Unit xxx.service is masked””The service is masked and cannot be started.
$ sudo systemctl unmask <service-name>$ sudo systemctl start <service-name>”xxx.service: Failed with result ‘exit-code’”
Section titled “”xxx.service: Failed with result ‘exit-code’””The service started but exited abnormally.
$ systemctl show <service-name> -p ExecMainStatus$ journalctl -u <service-name> -e --no-pagerCommon causes: configuration file syntax error, port already in use, insufficient permissions, dependent service not started.
$ sudo ss -tlnp | grep :<port-number>”Failed to start xxx.service: Unit not found”
Section titled “”Failed to start xxx.service: Unit not found””The service unit file does not exist.
$ rpm -qa | grep <package-name>$ systemctl list-unit-files | grep <keyword>SELinux Errors
Section titled “SELinux Errors””Permission denied” but file permissions are correct
Section titled “”Permission denied” but file permissions are correct”The most common SELinux issue. Unix file permissions are correct, but the SELinux security context does not match.
$ sudo ausearch -m avc -ts recent$ sudo dnf install -y setroubleshoot-server$ sudo sealert -a /var/log/audit/audit.log | head -60$ sudo restorecon -Rv /path/to/files”SELinux is preventing xxx from yyy access on zzz”
Section titled “”SELinux is preventing xxx from yyy access on zzz””An SELinux policy is blocking an operation.
$ sudo ausearch -m avc -ts recent | audit2why$ sudo ausearch -m avc -ts recent | audit2allow -M my_policy$ sudo semodule -i my_policy.ppNon-Standard Port Blocked by SELinux
Section titled “Non-Standard Port Blocked by SELinux”For example, configuring Apache to listen on port 8888:
$ sudo semanage port -l | grep http_port_t$ sudo semanage port -a -t http_port_t -p tcp 8888Web Service Cannot Access User Home Directory Content
Section titled “Web Service Cannot Access User Home Directory Content”$ sudo setsebool -P httpd_enable_homedirs on$ sudo setsebool -P httpd_can_network_connect onNetwork Errors
Section titled “Network Errors””Network is unreachable”
Section titled “”Network is unreachable””No route to the destination.
$ ip route show$ ip route show defaultIf there is no default route:
$ sudo ip route add default via <gateway-IP>$ sudo nmcli connection modify "connection-name" ipv4.gateway <gateway-IP>$ sudo nmcli connection up "connection-name"“Connection refused”
Section titled ““Connection refused””No service is listening on the target port.
$ sudo ss -tlnp | grep :<port>$ systemctl status <service-name>”Name or service not known”
Section titled “”Name or service not known””DNS resolution failed.
$ cat /etc/resolv.conf$ ping -c 2 $(grep nameserver /etc/resolv.conf | head -1 | awk '{print $2}')$ dig @8.8.8.8 <domain>”bind: Address already in use”
Section titled “”bind: Address already in use””The port is already occupied by another process.
$ sudo ss -tlnp | grep :<port>$ sudo lsof -i :<port>$ sudo kill <PID>Disk Errors
Section titled “Disk Errors””No space left on device”
Section titled “”No space left on device””Disk space is insufficient.
$ df -h$ sudo du -sh /* 2>/dev/null | sort -rh | head -10$ sudo dnf clean all$ sudo journalctl --vacuum-size=100M$ sudo find /tmp -type f -atime +7 -deleteIf df -h shows space is available but the error persists:
$ df -iInode exhaustion is usually caused by a large number of small files in a single directory:
$ sudo find / -xdev -printf '%h\n' | sort | uniq -c | sort -rn | head -10“Structure needs cleaning” / Filesystem Errors
Section titled ““Structure needs cleaning” / Filesystem Errors”Filesystem corruption.
$ sudo umount /dev/sda2$ sudo fsck -y /dev/sda2Warning: Never run fsck on a mounted filesystem. If it is the root partition, you must operate from rescue mode.
”Read-only file system”
Section titled “”Read-only file system””The filesystem was forcibly switched to read-only mode, usually because disk errors were detected.
$ dmesg | grep -i -E '(error|fail|read.only|EXT4-fs)'$ sudo mount -o remount,rw /If remounting fails, it indicates a hardware issue with the disk and repair from rescue mode is needed.
/boot Space Insufficient Causing Kernel Installation Failure
Section titled “/boot Space Insufficient Causing Kernel Installation Failure”$ df -h /boot$ rpm -qa kernel-core | sort -V$ sudo dnf remove --oldinstallonly --setopt installonly_limit=2 kernelPermission Errors
Section titled “Permission Errors””Operation not permitted” (even as root)
Section titled “”Operation not permitted” (even as root)”The file may have the immutable attribute set.
$ lsattr <file-path>If you see the i flag (immutable):
$ sudo chattr -i <file-path>“xxx: command not found”
Section titled ““xxx: command not found””The command is not in the PATH, or the corresponding package is not installed.
$ dnf provides <command-name>$ /usr/sbin/<command-name>$ echo $PATH”cannot create regular file: Permission denied”
Section titled “”cannot create regular file: Permission denied””$ ls -la <target-directory>$ ls -laZ <target-directory>$ getfacl <target-directory>SSH-Related Errors
Section titled “SSH-Related Errors””WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!”
Section titled “”WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!””The server key has changed (common after OS reinstallation or migration).
$ ssh-keygen -R <hostname-or-IP>”Permission denied (publickey,gssapi-keyex,gssapi-with-mic)”
Section titled “”Permission denied (publickey,gssapi-keyex,gssapi-with-mic)””Key authentication failed, and the server has password authentication disabled.
$ sudo grep -E '(PasswordAuthentication|PubkeyAuthentication|PermitRootLogin)' /etc/ssh/sshd_config$ ls -la ~/.ssh/$ chmod 700 ~/.ssh$ chmod 600 ~/.ssh/id_rsa$ chmod 644 ~/.ssh/id_rsa.pub$ chmod 700 ~/.ssh$ chmod 600 ~/.ssh/authorized_keys