I am new to Linux, using Ubuntu 18.04. Whenever I try sudo apt-get update, I get these errors: (Btw I referred to this link - apt-get update says E: Sub-process returned an error code , and tried the suggestions but that didnt work for me. Please help me resolve this.
Hit:1 bionic InRelease
Get:2 bionic-updates InRelease [88.7 kB]
Hit:3 bionic-backports InRelease
Ign:4 bionic InRelease
Hit:5 bionic InRelease
Get:6 stable InRelease [4,502 B]
Hit:7 bionic InRelease
Hit:8 stable InRelease
Hit:9 stable InRelease
Get:10 bionic-updates/main i386 Packages [1,309 kB]
Get:11 bionic-updates/main amd64 Packages [2,126 kB]
Get:12 bionic-updates/main Translation-en [421 kB]
Get:13 bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Get:14 bionic-updates/universe amd64 Packages [1,738 kB]
Get:14 bionic-updates/universe amd64 Packages [1,738 kB]
Get:14 bionic-updates/universe amd64 Packages [1,738 kB]
Hit:17 bionic InRelease
Hit:18 stable InRelease
Hit:19 bionic-security InRelease
Err:6 stable InRelease The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository <>
Err:14 bionic-updates/universe amd64 Packages Hash Sum mismatch Hashes of expected file: - Filesize:1738296 [weak] - SHA256:b5b33b5f2f03553cfed3fdc4b49de56337e3478683084543e41c4c454ce33b83 - SHA1:b73196ca99d1b4fc678e0cf813e25afaf9a84b11 [weak] - MD5Sum:384518af35538afb3103cb07b3c18b71 [weak] Hashes of received file: - SHA256:47fc2f4ec9c048bba09b6874b8b4d5602ba5248897a6c349e8b0338be8023929 - SHA1:aff42a04536ae004cf2b5b66eb2f9f112ee13add [weak] - MD5Sum:b6d999f607cb1426fb1c590a6bc353bb [weak] - Filesize:1738296 [weak] Last modification reported: Sat, 26 Jun 2021 00:41:53 +0000 Release file created at: Sat, 26 Jun 2021 00:41:00 +0000
Get:20 bionic-updates/universe i386 Packages [1,568 kB]
Err:21 bionic Release 404 Not Found [IP: 91.189.95.85 80]
Err:20 bionic-updates/universe i386 Packages
Hit:23 jessie InRelease
Get:22 any InRelease [23.2 kB]
Err:22 any InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7E65990E879472F
sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: stable InRelease: The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository <>
E: The repository ' bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: any InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7E65990E879472F
E: The repository ' any InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code 0 1 Answer
You have to fix several issues:
Hash sum mismatch is fixable by
sudo rm -rf /var/lib/apt/lists/*Skype GPG key should be updated by
sudo apt-key del 1F3045A5DF7587C3 wget -O - | sudo apt-key add -Kazam PPA does not publish packages for Ubuntu 18.04 LTS (bionic), so should be disabled by
sudo apt-get update sudo apt-get install software-properties-common sudo add-apt-repository -r ppa:kazam-team/stable-seriesPackagecloud GPG should be updated by
wget -O - | sudo apt-key add -Broken
/usr/lib/cnf-update-db, reinstall it withsudo apt-get install --reinstall command-not-found sudo apt-get install -f sudo dpkg --configure -a
Then finally run sudo apt-get update and it should work.