0

I'm still early in my understanding of Linux and computers in general. I have a Raspberry Pi 3, and I'm trying to install python3-samba, and I've encountered some errors that I'm not too sure about how to fix. Furthermore, I've searched on Google and here on stack Exchange, but nothing seems to work. Here's the output in terminal:

pi@raspberrypi:/ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  attr libfuse2 liburing1 tdb-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python3-samba
The following NEW packages will be installed:
  python3-samba
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
12 not fully installed or removed.
Need to get 2,319 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf python3-samba armhf 2:4.13.13+dfsg-1~deb11u5 [2,319 kB]
Fetched 2,319 kB in 1s (1,984 kB/s) 
Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 29, in <module>
    import apt_pkg
ImportError: /usr/lib/python3/dist-packages/apt_pkg.cpython-39-arm-linux-gnueabihf.so: invalid ELF header
(Reading database ... 107133 files and directories currently installed.)
Preparing to unpack .../python3-samba_2%3a4.13.13+dfsg-1~deb11u5_armhf.deb ...
Unpacking python3-samba (2:4.13.13+dfsg-1~deb11u5) ...
dpkg: error processing archive /var/cache/apt/archives/python3-samba_2%3a4.13.13+dfsg-1~deb11u5_armhf.deb (--unpack):
 unable to stat './usr/share/lintian/overrides/python3-samba' (which was about to be installed): Bad message
Errors were encountered while processing:
 /var/cache/apt/archives/python3-samba_2%3a4.13.13+dfsg-1~deb11u5_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm just wondering if someone can point me in the right direction if they have time. Thanks.

I tried to install some programs that were in a tutorial for creating a NAS with a Raspberry Pi and one program in particular would not install because of an error. I expected it to install, but it didn't.

6
  • Could be corruption happening on your storage. I'd reinstall the python3-apt package containing the offending file. Probably using apt-get download + dpkg --install. Also verify that you don't have a filesystem full. Commented Dec 28, 2023 at 10:42
  • Didn't see the stat error. Really looks like a kind of corruption. Are there any messages in dmesg output suggesting you have a disk issue? Commented Dec 28, 2023 at 10:49
  • Multiple errors like this ... [ 1922.559153] EXT4-fs error (device mmcblk0p2): ext4_dx_csum_verify:499: inode #186208: comm dpkg: dir seems corrupt? Run e2fsck -D. [ 1922.559229] EXT4-fs error (device mmcblk0p2): dx_probe:818: inode #186208: comm dpkg: Directory index failed checksum Commented Dec 28, 2023 at 11:06
  • I think you are right, thanks for the help though, I appreciate it. Commented Dec 28, 2023 at 11:09
  • Debian 11 so no kernel 6.1 issue. Can't tell if it's the disk or memory or anything else. Anyway backup data and consider reinstalling. Commented Dec 28, 2023 at 11:10

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.