You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Errors trying to run apt-get update

Author (Read 19066 times)

0 Members and 1 Guest are viewing this topic.

Re: Errors trying to run apt-get update
« Reply #3 on: November 29, 2019, 04:29:55 PM »
 

don.munyak

  • New to Forums
  • *
  • 2
    Posts
  • Reputation: 0
  • Linux Lite Member
    • View Profile
I believe you assessment about python3-apt being a little buggered
Tried to update, install & reinstall python3-apt
Tried to update apt-get

sudo apt-get install python-apt
sudo apt-get update
sudo apt-get install python3-apt --reinstall
sudo apt-get update
sudo apt autoremove

ultimately came across a similar thread, with similar issue
advice given:

cd  /usr/lib/python3/dist-packages
ls -la /usr/lib/python3/dist-packages
sudo cp apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so

These all work now.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install

Thank you for your assistance.
 

Re: Errors trying to run apt-get update
« Reply #2 on: November 27, 2019, 01:57:07 PM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1463
    Posts
  • Reputation: 212
  • Linux Lite Member
    • View Profile
    • dbts-analytics.com

  • CPU: i7 4 cores 8 threads

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD graphics

  • Kernel: 5.x
Not completely familiar with your situation, but it is more than likely python versions that is the issue. Perhaps the link below may be of some help. In the meantime you may want to remove the vs/repo from update list.

https://stackoverflow.com/questions/13708180/python-dev-installation-error-importerror-no-module-named-apt-pkg

TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Errors trying to run apt-get update
« Reply #1 on: November 27, 2019, 11:37:11 AM »
 

don.munyak

  • New to Forums
  • *
  • 2
    Posts
  • Reputation: 0
  • Linux Lite Member
    • View Profile
Errors trying to run apt-get update

Description:   Linux Lite 4.2
Release:   18.04
Codename:   bionic
Kernel 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Hit:1 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                     
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease           
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                     
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Hit:7 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu bionic InRelease
Hit:8 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease         
Hit:9 http://repo.linuxliteos.com/linuxlite diamond InRelease                 
Traceback (most recent call last):                     
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 11, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 11, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
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
« Last Edit: December 29, 2019, 06:15:13 PM by firenice03 »
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section