LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Software updates failed Python error
#1
Here is the log:
I did try the package fix  in  lite tweaks
Any help is appreciated.
When I tried running "software and updates"  it would not launch so tried running from cmd line and
got the error below. Thought I could remove the ppa as I do not know what that program is.

sudo software-properties-gtk
[sudo] password for jrm:
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 32, in <module>
    import aptsources
  File "/usr/lib/python3/dist-packages/aptsources/__init__.py", line 3, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'


===========================
Install Updates Error log
===========================
Install Updates could not fetch the package cache information lists.
Go to https://www.freecinema2022.gq/forums/ and paste the log below into a new or existing thread for assistance.

============ Log ===========

Hit:1 http://packages.microsoft.com/repos/code stable InRelease
Hit:2 http://repo.linuxliteos.com/linuxlite diamond InRelease
Hit:3 http://ppa.launchpad.net/mosquitto-dev/m...ppa/ubuntu bionic InRelease
Hit:4 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease
Hit:5 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic 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'
Reading package lists...
E: Problem executing scripts APT::Update:Tongueost-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
Reply
#2
The soft link  apt_pkg.so was pointing to apt_pkg.cpython-38m-x86_64-linux-gnu.so  which did not exist so I changed it to
apt_pkg.cpython-36m-x86_64-linux-gnu.so and that was one part to fix the problem.

The other part was change the soft link python3 to point to python3.6m instead of python3.8m

Then I was able to update. I found out that ubuntu 18.04 uses python3.6 as the python for the system scripts
When I used python3.8 for my scripts I thought I could update the apt_get.so  but nope.

Everything works now. Keep fingers crossed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)