Symptoms
When updating packages on an Ubuntu server, you encounter an error similar to the following.
Get:239 mirror://httpupdate.cpanel.net/ea4-u20-mirrorlist ./ ea-php83-pear 1.10.16-4+7.8.cpanel [280 kB] Err:239 mirror://httpupdate.cpanel.net/ea4-u20-mirrorlist ./ ea-php83-pear 1.10.16-4+7.8.cpanel Hash Sum mismatch Hashes of expected file: - SHA256:474a7390feac9ee6dfe36006361979635ab25229e0b13641ed1a4a5819d2189f - SHA1:5fa0758cc00fc1f3d7fe66555da89b2b4522a9b0 [weak] - MD5Sum:1fdcb96b5305ceb450bb9bf0d8529616 [weak] - Filesize:279696 [weak] Hashes of received file: - SHA256:e55d2eddece49a83984bf9d4047c2b8905207a6c21ab10d00fed54cca2c73a00 - SHA1:69153794909595abbc2a5d93d0bebc544b4b8dc9 [weak] - MD5Sum:e9543f644e2444e1c4d232df4cc2d730 [weak] - Filesize:11556 [weak] Last modification reported: Tue, 10 Jun 2025 20:41:10 +0000
Description
The error often occurs when apt is not up to date. Updating apt and related packages will correct the error.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
-
Run the following commands.
/usr/local/cpanel/scripts/updatesigningkey
apt clean
apt-get --only-upgrade install apt apt-transport-https apt-plugin-universal-hooks -y
apt update
apt upgrade -y