Entering edit mode
4.8 years ago
harry
▴
30
$ sudo apt update
[sudo] password:
Get:1 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease [3,626 B]
Get:2 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ Packages [54.6 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Err:5 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Connection failed [IP: 91.189.88.24 80]
Get:6 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Fetched 221 kB in 1min 12s (3,062 B/s)
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 8, in <module>
from CommandNotFound.db.creator import DbCreator
File "/usr/lib/CommandNotFound/db/creator.py", line 11, in <module>
import apt_pkg
ImportError: No module named apt_pkg
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 91.189.88.24 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
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
Please help me out.