Error when executing: "dnf upgrade --refresh" on Fedora 37 Workstation

Greetings,

Everyday on the first startup i execute the bellow command in the terminal, in order to update my system:

sudo dnf upgrade --refresh -y

────────────────────────────────────────────────────────────────

Yesterday when executed it and restarted my PC when i logged back in i got this pop up message:

c8d3ef1af7a05c55c056521e32ea9f1505a7dd45.png
(updates if im not mistaken was kernel related).

────────────────────────────────────────────────────────────────

Since today whenever i execute the above command i get this error:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 61, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.11/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.11/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python3.11/site-packages/libdnf/__init__.py", line 12, in <module>
    from . import conf
  File "/usr/lib64/python3.11/site-packages/libdnf/conf.py", line 13, in <module>
    from . import _conf
ImportError: /lib64/libzck.so.1: file too short

────────────────────────────────────────────────────────────────

My system specifications.

  • MOBO: ASHROCK AB350 M PRO-4

  • CPU: AMD RYZEN 3 1200

  • RAM: Corsair Value Select DDR4 2100MhZ

  • SSD: PNY 120GB

  • OS: Fedora 37 Workstation

  • Desktop Environment: Gnome/Wayland

  • Kernel Version: 6.1.12-200.fc37.x86_64

────────────────────────────────────────────────────────────────

If that helps in any way, based on a similar post who i found i executed the bellow commands and here is their results:

Command:

rpm -qa | grep kernel-modules-extra

Result:

kernel-modules-extra-6.1.10-200.fc37.x86_64
kernel-modules-extra-6.1.11-200.fc37.x86_64
kernel-modules-extra-6.1.12-200.fc37.x86_64

Command:

sudo dnf info kernel

Result:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 61, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.11/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.11/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python3.11/site-packages/libdnf/__init__.py", line 12, in <module>
    from . import conf
  File "/usr/lib64/python3.11/site-packages/libdnf/conf.py", line 13, in <module>
    from . import _conf
ImportError: /lib64/libzck.so.1: file too short

Just let the -y away, and you have time to read what the system does … if you suspect it could make you some troubles just hit enter and you pull the update.

Collect the output:

rpm -q -f /lib64/libzck.so.1; rpm -q zchunk-libs
rpm -V zchunk-libs; dnf repolist 

Thanks for your reply,

The output of: rpm -q -f /lib64/libzck.so.1; rpm -q zchunk-libs is:

zchunk-libs-1.2.4-1.fc37.x86_64
zchunk-libs-1.2.4-1.fc37.x86_64

And of: rpm -V zchunk-libs; dnf repolist is:

S.5......    /usr/lib64/libzck.so.1.2.4
Traceback (most recent call last):
  File "/usr/bin/dnf", line 61, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.11/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.11/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python3.11/site-packages/libdnf/__init__.py", line 12, in <module>
    from . import conf
  File "/usr/lib64/python3.11/site-packages/libdnf/conf.py", line 13, in <module>
    from . import _conf
ImportError: /lib64/libzck.so.1: file too short
wget https://dl.fedoraproject.org/pub/fedora/linux/updates/37\
/Everything/x86_64/Packages/z/zchunk-libs-1.2.4-1.fc37.$(arch).rpm
sudo rpm --force -i zchunk-libs-*.$(arch).rpm

After i executed your above commands, sudo dnf upgrade --refresh was finally executed with out any errors with the bellow output:

================================================================================
 Package                        Arch   Version                    Repo     Size
================================================================================
Upgrading:
 c-ares                         x86_64 1.19.0-1.fc37              updates 109 k
 clamav                         x86_64 0.103.8-3.fc37             updates 305 k
 clamav-data                    noarch 0.103.8-3.fc37             updates 220 M
 clamav-filesystem              noarch 0.103.8-3.fc37             updates  20 k
 clamav-lib                     x86_64 0.103.8-3.fc37             updates 839 k
 clamav-update                  x86_64 0.103.8-3.fc37             updates  95 k
 cmake                          x86_64 3.26.0~rc3-1.fc37          updates 6.8 M
 cmake-data                     noarch 3.26.0~rc3-1.fc37          updates 2.2 M
 cmake-filesystem               x86_64 3.26.0~rc3-1.fc37          updates  17 k
 cmake-rpm-macros               noarch 3.26.0~rc3-1.fc37          updates  16 k
 conmon                         x86_64 2:2.1.6-3.fc37             updates  53 k
 distribution-gpg-keys          noarch 1.84-1.fc37                updates 435 k
 edk2-ovmf                      noarch 20221117gitfff6d81270b5-14.fc37
                                                                  updates  10 M
 grub2-common                   noarch 1:2.06-88.fc37             updates 917 k
 grub2-efi-ia32                 x86_64 1:2.06-88.fc37             updates 2.1 M
 grub2-efi-ia32-cdboot          x86_64 1:2.06-88.fc37             updates 2.1 M
 grub2-efi-x64                  x86_64 1:2.06-88.fc37             updates 2.2 M
 grub2-efi-x64-cdboot           x86_64 1:2.06-88.fc37             updates 2.2 M
 grub2-pc                       x86_64 1:2.06-88.fc37             updates  19 k
 grub2-pc-modules               noarch 1:2.06-88.fc37             updates 958 k
 grub2-tools                    x86_64 1:2.06-88.fc37             updates 1.8 M
 grub2-tools-efi                x86_64 1:2.06-88.fc37             updates 559 k
 grub2-tools-extra              x86_64 1:2.06-88.fc37             updates 865 k
 grub2-tools-minimal            x86_64 1:2.06-88.fc37             updates 623 k
 ibus-m17n                      x86_64 1.4.19-1.fc37              updates 190 k
 podman                         x86_64 5:4.4.1-3.fc37             updates  14 M
 podman-gvproxy                 x86_64 5:4.4.1-3.fc37             updates 3.6 M
 rav1e-libs                     i686   0.5.1-9.fc37               updates 741 k
 rav1e-libs                     x86_64 0.5.1-9.fc37               updates 894 k
 sane-backends                  x86_64 1.2.1-1.fc37               updates 846 k
 sane-backends-drivers-cameras  i686   1.2.1-1.fc37               updates 3.0 M
 sane-backends-drivers-cameras  x86_64 1.2.1-1.fc37               updates 2.9 M
 sane-backends-drivers-scanners i686   1.2.1-1.fc37               updates 2.9 M
 sane-backends-drivers-scanners x86_64 1.2.1-1.fc37               updates 2.8 M
 sane-backends-libs             i686   1.2.1-1.fc37               updates  50 k
 sane-backends-libs             x86_64 1.2.1-1.fc37               updates  48 k
 xen-libs                       x86_64 4.16.3-3.fc37              updates 643 k
 xen-licenses                   x86_64 4.16.3-3.fc37              updates  54 k

Transaction Summary
================================================================================
Upgrade  38 Packages

Total download size: 288 M

By the way, do you have any idea what caused my issue?

Thank you very much! :blue_heart:

Looks like a file system error that caused the library to become corrupted.
It may not be limited to a single file, so it makes sense to verify all installed packages:

sudo rpm -V -a
1 Like