when command-not-found is installed I get an apt-get update error

Bug #2028069 reported by Julio Martinez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.10 (Ubuntu)
New
Undecided
Unassigned
sqlite3 (Ubuntu)
New
Undecided
Unassigned

Bug Description

1)
Description: Ubuntu 22.04.2 LTS
Release: 22.04

2)
command-not-found:
  Installed: 22.04.0
  Candidate: 22.04.0
  Version table:
 *** 22.04.0 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main i386 Packages
        100 /var/lib/dpkg/status

3)
Tried running `apt-get update` I'd expect to run smoothly,

4)
but got the error

```
Get:20 http://gb.archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 499 kB in 1s (795 kB/s)
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 9, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 7, in <module>
    import sqlite3
  File "/usr/lib/python3.10/sqlite3/__init__.py", line 57, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/lib/python3.10/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: /usr/lib/python3.10/lib-dynload/_sqlite3.cpython-310-x86_64-linux-gnu.so: undefined symbol: sqlite3_enable_load_extension
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
```

It seems there is a library it was removed from my Ubuntu, but I don't know which one it is (I'm not the only admin for this box), I realised if I remove `command-not-found` it "fixes" the error but just because I don't see it, because when I run `python3 -c 'import sqlite3' I get the same error.

I think whichever package has been removed from this installation should be part of the dependencies for `command-not-found` (I re-install command-not-found and the issue is not fixed)

Thanks

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: command-not-found 22.04.0
ProcVersionSignature: Ubuntu 5.19.0-46.47~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-46-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Jul 18 15:35:12 2023
InstallationDate: Installed on 2023-07-03 (15 days ago)
InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223)
PackageArchitecture: all
SourcePackage: command-not-found
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Julio Martinez (julioorf) wrote :
affects: ubuntu → command-not-found (Ubuntu)
affects: command-not-found (Ubuntu) → python3.10 (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.