EL7 Packages causing WHM error: Attempt to call undefined import method with arguments Print

  • 0

Symptoms

WHM reports the following error on all pages:

[2026-01-17 18:41:48 +0700] warn [Internal Warning while parsing [stdin] 530596] Attempt to call undefined import method with arguments ("overwrite") via package "Cpanel::FileUtils::Write" (Perhaps you forgot to load the package?) at /usr/local/cpanel/Whostmgr/360Monitoring/Agent.pm line 18.
at /usr/local/cpanel/Whostmgr/360Monitoring/Agent.pm line 18.
Whostmgr::360Monitoring::Agent::BEGIN() called at /usr/local/cpanel/Whostmgr/360Monitoring/Agent.pm line 18
eval {...} called at /usr/local/cpanel/Whostmgr/360Monitoring/Agent.pm line 18
require Whostmgr/360Monitoring/Agent.pm called at /usr/local/cpanel/Whostmgr/360Monitoring/Base.pm line 16
Whostmgr::360Monitoring::Base::BEGIN() called at /usr/local/cpanel/Whostmgr/360Monitoring/Base.pm line 16
eval {...} called at /usr/local/cpanel/Whostmgr/360Monitoring/Base.pm line 16
require Whostmgr/360Monitoring/Base.pm called at /usr/local/cpanel/3rdparty/perl/542/cpanel-lib/Moo/_Utils.pm line 113
eval {...} called at /usr/local/cpanel/3rdparty/perl/542/cpanel-lib/Moo/_Utils.pm line 113
Moo::_Utils::_require("Whostmgr/360Monitoring/Base.pm") called at /usr/local/cpanel/3rdparty/perl/542/cpanel-lib/Moo/_Utils.pm line 131
...

 

Cause

The server is running AlmaLinux or CloudLinux 8 or higher, but has CentOS or CloudLinux 7 packages installed. 

 

Resolution

Remove the EL7 packages from the EL8+ system by following these steps:

  1. Log in to the server via SSH or WHM's Terminal as the root user
  2. Run the following command to remove the EL7 packages:

    rpm -qa|grep \.el7|while read oldpkg ; do rpm -e --nodeps --justdb $oldpkg; done

  3. Run the following command to update all packages:

    dnf update


Was this answer helpful?
Back

Send Message