1

When I run sudo apt update

It is returning

$ 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
nas
  • 117

1 Answers1

1

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

Basically, if ls -la /usr/bin/python shows a python2 version:

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

Good luck!

  • I tried this one too. But with no luck. It start getting annoying so I reinstalled Ubuntu again – nas Dec 07 '20 at 09:37