How to Check for Missing Packages in cPanel & Fix Them Easily
11 mins read

How to Check for Missing Packages in cPanel & Fix Them Easily

TL;DR

Missing packages in cPanel are RPM files required for functionality but sometimes go missing due to failed updates, migrations, manual removals, or disk issues, causing server and website problems.

To detect and fix missing packages:

  1. SSH into your server as root.
  2. Run /scripts/check_cpanel_rpms to scan for missing packages.
  3. Use /scripts/check_cpanel_rpms --fix to automatically reinstall or repair them.
  4. Run yum clean all && yum update (or dnf clean all && dnf update on newer OS).
  5. Rebuild EasyApache4 if web services break.

If the RPM database is corrupted, rebuild it using rpm --rebuilddb.

Server acting up? Website not loading properly? Missing packages might be the culprit.

If you manage a cPanel server, you’ve probably encountered the dreaded “missing package” error at some point. It’s frustrating. But it’s also fixable.

Missing packages can break everything from website functionality to WHM updates. The good news? cPanel provides built-in tools to detect and fix these issues quickly.

This guide walks you through the entire process. We’ll cover how to check for missing packages, fix them safely, and prevent future problems. No fluff—just practical steps that actually work.

Whether you’re dealing with a migration gone wrong or a failed update, these methods will get your server back on track.

What Are Missing Packages in cPanel?

Missing packages are RPM files that cPanel expects to find but can’t locate on your system. Think of them as missing puzzle pieces.

cPanel relies on hundreds of packages to function properly. These include everything from Apache modules to Perl libraries. When one goes missing, things break.

Understanding Package Dependencies

Every package has dependencies. Package A needs Package B to work. Package B needs Package C. It’s a chain reaction.

When you remove or corrupt one package, it can affect dozens of others. This creates a domino effect that can cripple your server.

Common Causes of Missing Packages

Failed updates are the most common cause. The update process gets interrupted, leaving packages in a broken state.

Server migrations also cause problems. Not all packages get transferred correctly between servers.

Manual package removal is another culprit. Some admins remove packages thinking they’re unnecessary. Big mistake.

Disk space issues can corrupt the RPM database. When the disk fills up during an update, packages get corrupted or go missing.

When You Might Encounter This

You’ll typically notice missing packages after major changes. Fresh server setups often have incomplete package installations.

OS upgrades frequently cause package conflicts. CentOS 7 to 8 migrations are notorious for this.

EasyApache rebuilds sometimes fail due to missing dependencies. The build process stops and throws errors.

Tools & Scripts Used to Detect Missing Packages

cPanel provides several tools to identify missing packages. Each serves a specific purpose.

/scripts/check_cpanel_rpms

This is your primary weapon. It scans the entire system for missing cPanel packages.

The script compares what should be installed against what actually exists. It then provides a detailed report.

You can run it in check-only mode or with automatic fixes. We’ll cover both approaches.

/scripts/upcp

The Update cPanel script also checks for missing packages. It’s less targeted but more comprehensive.

Running upcp forces a complete cPanel update. This often resolves missing package issues automatically.

Use this when check_cpanel_rpms doesn’t solve everything.

yum check and rpm -Va

These are system-level tools. They work below cPanel’s layer.

yum check identifies broken dependencies across all packages. Not just cPanel ones.

rpm -Va verifies all installed packages. It spots corrupted files and missing components.

dnf Commands for Modern Systems

CentOS 8, AlmaLinux, and Rocky Linux use DNF instead of YUM. The commands are similar but not identical.

dnf check replaces yum check. It provides the same functionality with better performance.

dnf list --duplicates helps identify conflicting package versions.

How to Check Missing Packages in cPanel (Step-by-Step)

Let’s fix your server. Follow these steps in order for the best results.

Step 1: Log into Your Server via SSH

Connect to your server using SSH. You’ll need root access for these commands.

Use your preferred SSH client. PuTTY works fine on Windows. Terminal works on Mac and Linux.

Make sure you’re in the root directory. Run cd / to be safe.

Step 2: Run /scripts/check_cpanel_rpms

Start with a diagnostic scan. This shows what’s missing without making changes.

/scripts/check_cpanel_rpms

The script will scan your system. This takes 2-5 minutes depending on server specs.

Review the output carefully. It lists missing packages and broken dependencies.

Step 3: Use –fix Flag to Reinstall or Repair

Ready to fix the issues? Run the script with the repair flag.

/scripts/check_cpanel_rpms --fix

This automatically downloads and installs missing packages. It also repairs corrupted ones.

The process can take 10-30 minutes. Don’t interrupt it.

Step 4: Run yum clean all && yum update

Clean your package cache and update everything.

yum clean all && yum update

For DNF systems, use:

dnf clean all && dnf update

This ensures all packages are current and dependencies are resolved.

Step 5: Rebuild EasyApache4 if Needed

Web server issues? Rebuild EasyApache4 to be safe.

/scripts/rebuild_phpconf --current

This recreates Apache and PHP configurations. It resolves most web server problems.

How to Fix RPM DB Issues and Broken Dependencies

Sometimes the RPM database itself gets corrupted. Standard package checks won’t help.

Detect RPM Database Corruption

Run this command to check database integrity:

rpm -qa > /dev/null

If it hangs or throws errors, your RPM database is corrupted.

You might see errors like “rpmdb: Thread died in Berkeley DB library” or similar.

Use rpm –rebuilddb

Rebuild the entire RPM database from scratch:

rpm --rebuilddb

This process takes 5-15 minutes. Your server might be slow during this time.

The command recreates all database files. It fixes most corruption issues.

Clean YUM/DNF Cache and Update Repo Metadata

Clear all cached package data:

yum clean all
yum makecache

For DNF systems:

dnf clean all
dnf makecache

This forces fresh downloads of package metadata. It resolves repository conflicts.

Common Errors & How to Solve Them

Here are the most frequent errors and their solutions.

“pkgacct failed: missing package”

This error appears during account migrations. A required package is missing from the destination server.

Run /scripts/check_cpanel_rpms --fix on the destination server first.

Then retry the migration. The missing packages should now be available.

“EA4 not compiling due to missing dependency”

EasyApache4 builds fail when development packages are missing.

Install the development tools group:

yum groupinstall "Development Tools"

Then rebuild EasyApache4 through WHM or command line.

“dnf: No match for argument” error

This happens when package names change between OS versions.

Check the exact package name:

dnf search package_name

Use the correct name in your commands.

WHM UI Showing Blank or Failing Updates

The WHM interface relies on specific packages. When they’re missing, the UI breaks.

Run a full cPanel update:

/scripts/upcp --force

This reinstalls all WHM components and fixes interface issues.

When Should You Run check_cpanel_rpms?

Timing matters. Here’s when to use this tool.

After Migrations

Always run the check after moving servers. Source and destination servers rarely have identical package sets.

Run it before migrating accounts. This prevents “missing package” errors during transfers.

After Interrupted Updates

Power outages and network issues can interrupt updates. This leaves packages in broken states.

The check script identifies and fixes these partial installations.

When Installing Custom RPMs

Third-party packages sometimes conflict with cPanel packages. They might replace or remove required files.

Run the check after installing any non-cPanel RPMs.

On Newly Provisioned Servers

Fresh server installs often have incomplete package sets. Hosting providers use minimal installation images.

Run the check before putting the server into production.

Best Practices to Prevent Missing Packages in the Future

Prevention beats repair. Follow these practices to avoid package issues.

Enable Automatic Updates in WHM

Navigate to WHM > Server Configuration > Update Preferences.

Enable automatic cPanel updates. This keeps packages current and prevents conflicts.

Set it to install updates during low-traffic hours.

Avoid Manually Removing System RPMs

Don’t use yum remove or rpm -e on system packages. It breaks dependencies.

Use cPanel’s built-in tools to disable features instead.

Use cPanel-Managed Scripts Over Manual YUM Commands

cPanel’s scripts understand package relationships. Manual YUM commands don’t.

Use /scripts/easyapache instead of direct Apache package management.

Use WHM interfaces when available.

Keep System OS and cPanel Version in Sync

Match your cPanel version to your OS version. Don’t run bleeding-edge cPanel on old OS versions.

Update both regularly. Mismatched versions cause compatibility issues.

FAQs – cPanel Missing Packages

What is /scripts/check_cpanel_rpms and is it safe?

It’s cPanel’s official package verification tool. Yes, it’s completely safe to run.

The script only installs packages that should already be present. It doesn’t add unnecessary software.

Can missing packages break my website?

Yes, missing packages can cause website outages. They affect everything from PHP modules to Apache functionality.

Critical packages might prevent websites from loading entirely.

Will this reset or remove custom configurations?

No, the script only installs missing packages. It doesn’t modify existing configurations.

Your custom Apache configs, PHP settings, and other customizations remain untouched.

Is it safe to run –fix in production?

Yes, but schedule it during maintenance windows when possible.

The script is designed for production use. However, any system change carries minimal risk.

When to Contact Hosting Support or System Admin

Some situations require professional help.

Hosting Provider Responsibilities

Managed hosting providers should handle package issues. It’s part of their service.

Don’t attempt complex repairs on managed servers. You might void your support agreement.

Escalating to Managed Support

Contact support when:

  • Multiple package repair attempts fail
  • Critical system files are corrupted
  • You’re unsure about command safety

Provide them with error logs and command outputs.

How SkyNetHosting Can Handle Server Repairs Safely

Professional hosting providers like SkyNetHosting have experience with complex package issues.

They can safely repair corrupted systems without risking data loss.

Their managed support includes proactive package monitoring and automatic repairs.

Missing packages don’t have to ruin your day. The tools exist to fix them quickly and safely.

Start with /scripts/check_cpanel_rpms for most issues. Use the --fix flag when you’re ready to repair.

Keep your system updated and avoid manual package removal. Prevention really is better than repair.

When in doubt, contact your hosting provider. Professional support can save you hours of troubleshooting.

Your server should work reliably. These tools help ensure it does.

Leave a Reply

Your email address will not be published. Required fields are marked *