Модуль не найден ошибка при выполнении команды sudo apt update после обновления до ubuntu 19.10 от 18.04 [дубликат]

Терминал выдал мне эти ошибки при обновлении программного обеспечения с помощью sudo apt update .

Hit:1 http://it.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://it.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                       
Hit:3 http://it.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                     
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                                     
Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                
Traceback (most recent call last):                    
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
ModuleNotFoundError: No module named 'CommandNotFound'
Reading packages list... Done
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  

Это результаты sudo apt install --reinstall command-not-found

Reading package lists... Done 
Building dependency tree        
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/5.188 B of archives
After this operation, 0 B of additional disk space will be used.
(Reading the database ... 225797 files and directories currently installed.)
Preparations for extracting ... / command-not-found_18.04.4_all.deb ...
Extracting command-not-found (18.04.4) on (18.04.4) ...
Configuring command-not-found (18.04.4) ...
libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...

Когда я снова попробовал команду sudo apt update после переустановки command-not-found, результаты были такими же, как описано в первом текстовом блоке.

6
задан 5 June 2020 в 09:59

1 ответ

Это не идеально, но это мой текущий обходной путь:

sudo apt purge command-not-found 
sudo apt --purge autoremove
sudo bash -c 'apt update && apt full-upgrade && apt autoremove && apt clean'
0
ответ дан 19 March 2021 в 00:04

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

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