apt-get update выдает ошибку в Ubuntu 18.04

Я новичок в Linux, использую Ubuntu 18.04. Всякий раз, когда я пытаюсь sudo apt-get update, я получаю эти ошибки: (Btw Я обратился к этой ссылке - apt-get update says E: Sub-process returned an error code , и попробовал предложения, но это не сработало для меня. Пожалуйста, помогите мне решить эту проблему.

Hit:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                                                   
Hit:3 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                                           
Ign:4 http://ppa.launchpad.net/kazam-team/stable-series/ubuntu bionic InRelease                                                                                                
Hit:5 http://download.virtualbox.org/virtualbox/debian bionic InRelease                                                                                                        
Get:6 https://repo.skype.com/deb stable InRelease [4,502 B]                                                                                                                    
Hit:7 http://archive.canonical.com/ubuntu bionic InRelease                                                                                                                     
Hit:8 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                   
Hit:9 https://linux.teamviewer.com/deb stable InRelease                                                                                                                        
Get:10 http://in.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,309 kB]                                                                                        
Get:11 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,126 kB]                                                                                       
Get:12 http://in.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [421 kB]                                                                                         
Get:13 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]                                                                         
Get:14 http://in.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,738 kB]                                                                          
Get:14 http://in.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,738 kB]                                                                          
Get:14 http://in.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,738 kB]                                                                                   
Hit:17 http://ppa.launchpad.net/rednotebook/stable/ubuntu bionic InRelease                                                                                                     
Hit:18 https://packages.microsoft.com/repos/ms-teams stable InRelease                                                                                                          
Hit:19 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                                                             
Err:6 https://repo.skype.com/deb stable InRelease                                                                                                                              
  The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository <se-um@microsoft.com>
Err:14 http://in.archive.ubuntu.com/ubuntu 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 http://in.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1,568 kB]                                                                                    
Err:21 http://ppa.launchpad.net/kazam-team/stable-series/ubuntu bionic Release                                                         
  404  Not Found [IP: 91.189.95.85 80]
Err:20 http://in.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages                                                    
  
Hit:23 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease                                                      
Get:22 https://packagecloud.io/shiftkey/desktop/any any InRelease [23.2 kB]
Err:22 https://packagecloud.io/shiftkey/desktop/any 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: https://repo.skype.com/deb stable InRelease: The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository <se-um@microsoft.com>
E: The repository 'http://ppa.launchpad.net/kazam-team/stable-series/ubuntu 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: https://packagecloud.io/shiftkey/desktop/any any InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7E65990E879472F
E: The repository 'https://packagecloud.io/shiftkey/desktop/any 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
задан 26 June 2021 в 09:15

1 ответ

Вам нужно исправить несколько проблем:

  • Несоответствие хэш-сумм исправляется

    sudo rm -rf /var/lib/apt/lists/*
    
  • Ключ Skype GPG должен быть обновлен

    sudo apt-key del 1F3045A5DF7587C3
    wget https://repo.skype.com/data/SKYPE-GPG-KEY -O - | sudo apt-key add -...
    
  • Kazam PPA не публикует пакеты для Ubuntu 18.04 LTS (bionic), поэтому должен быть отключен

    sudo apt-get update
    sudo apt-get install software-properties-common
    sudo add-apt-repository -r ppa:kazam-team/stable-series
    
  • Packagecloud GPG должен быть обновлен

    wget https://packagecloud.io/shiftkey/desktop/gpgkey -O - | sudo apt-key add -...
    
  • Сломан /usr/lib/cnf-update-db, переустановите его с помощью

    sudo apt-get install --reinstall command-not-found
    sudo apt-get install -f
    sudo dpkg --configure -a
    

Затем, наконец, запустите sudo apt-get update и все должно заработать.

0
ответ дан 28 July 2021 в 11:24

Другие вопросы по тегам:

Похожие вопросы: