If you're experiencing YUM errors outside of EasyApache 4 on your WHM server, it can be a frustrating issue. However, there's a straightforward solution to resolve these errors. This guide will walk you through the steps to fix YUM encountered errors by removing a conflicting package and ensuring your system is up-to-date.
Prerequisites
- Access to WHM/cPanel server with root privileges.
- SSH access to the server.
Step 1: Update Your System
Start by updating your system to ensure all your packages are up-to-date. This step is crucial for maintaining system stability and security.
yum update
Step 2: Remove the Conflicting Package
The letsencrypt-cpanel
package can sometimes cause conflicts. Remove it using the following command:
yum remove letsencrypt-cpanel
If you're using a Debian-based system, you might also need to remove the package using apt
:
apt remove letsencrypt-cpanel
Step 3: Archive the Old Repository
Create a directory to archive the old letsencrypt
repository file, then move the file to this archive with a timestamp for reference:
mkdir -p /root/fleetssl-archive/
mv -v /etc/yum.repos.d/letsencrypt.repo /root/fleetssl-archive/letsencrypt.repo.$(date +%Y%m%d)
Step 4: Clean YUM Cache
Clear the YUM cache to remove any residual data from the removed repository:
yum clean all
yum makecache
Step 5: Install Let's Encrypt AutoSSL Provider
Reinstall the Let's Encrypt AutoSSL provider using cPanel's script:
/usr/local/cpanel/scripts/install_lets_encrypt_autossl_provider
Step 6: Final System Update
Finally, run a system update to ensure all changes are applied and your system is fully up-to-date:
yum update
By following these steps, you should be able to resolve YUM encountered errors outside of EasyApache 4 on your WHM server. Remember, keeping your system updated and resolving package conflicts promptly is key to maintaining a stable and secure server environment.