无法运行 apt update

无法运行 apt update

当我跑步时sudo apt update

它正在回归

$ sudo apt update
Hit:1 http://th.archive.ubuntu.com/ubuntu focal InRelease                                                                                  
Hit:2 http://th.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                          
Hit:3 http://th.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                        
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]                                                                  
Hit:5 https://download.docker.com/linux/ubuntu focal InRelease                                                                             
Hit:6 https://deb.nodesource.com/node_15.x focal InRelease                                                                     
Hit:7 https://linux.teamviewer.com/deb stable InRelease                        
Fetched 109 kB in 2s (52.1 kB/s)                         
sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... 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

答案1

https://askubuntu.com/a/1074876/1013762

基本上,如果ls -la /usr/bin/python显示python2版本:

sudo rm -f /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python

祝你好运!

相关内容