DNF Update fails: ImportError: /lib64/libdw.so.1: file too short

Hi @all,

I’m trying to do an update on my existing Fedora 32 system by “sudo dnf update” what happened to work fine until last week.

Now I’m getting an error saying “ImportError: /lib64/libdw.so.1: file too short”

What can I do to make dnf work again?

Yours

Chris

[christian@localhost ~]$ sudo dnf update
Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.8/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.8/site-packages/dnf/base.py", line 31, in <module>
    from dnf.comps import CompsQuery
  File "/usr/lib/python3.8/site-packages/dnf/comps.py", line 27, in <module>
    from dnf.exceptions import CompsError
  File "/usr/lib/python3.8/site-packages/dnf/exceptions.py", line 22, in <module>
    import dnf.util
  File "/usr/lib/python3.8/site-packages/dnf/util.py", line 30, in <module>
    import dnf.callback
  File "/usr/lib/python3.8/site-packages/dnf/callback.py", line 22, in <module>
    import dnf.yum.rpmtrans
  File "/usr/lib/python3.8/site-packages/dnf/yum/rpmtrans.py", line 26, in <module>
    import rpm
  File "/usr/lib64/python3.8/site-packages/rpm/__init__.py", line 38, in <module>
    from rpm._rpm import *
ImportError: /lib64/libdw.so.1: file too short

Very strange.
What is the result of this command?
rpmverify elfutils-libs

1 Like

[christian@localhost ~]$ rpmverify elfutils-libs
…L… /usr/lib64/libasm.so.1
…L… /usr/lib64/libdw.so.1
S.5… /usr/lib64/libasm-0.181.so
S.5… /usr/lib64/libdw-0.181.so

This means that something has modified these files. :thinking:
You should try to download the elfutils-libs rpm file and reinstall it with the rpm command.

2 Likes

Sorry, I’m somewhat lost. How do I reinstall?

I tried the following but I got even more erros.

[christian@localhost Downloads]$ sudo rpm -iv --replacepkgs elfutils-libs-0.179-1.fc32.i 686.rpm
error: Failed dependencies:
        elfutils-libelf(x86-32) = 0.179-1.fc32 is needed by elfutils-libs-0.179-1.fc32.i 686
        ld-linux.so.2 is needed by elfutils-libs-0.179-1.fc32.i686
        ld-linux.so.2(GLIBC_2.3) is needed by elfutils-libs-0.179-1.fc32.i686
        libbz2.so.1 is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6 is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.0) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.1) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.1.3) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.15) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.2) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.23) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.3) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.3.4) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.4) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.7) is needed by elfutils-libs-0.179-1.fc32.i686
        libc.so.6(GLIBC_2.8) is needed by elfutils-libs-0.179-1.fc32.i686
        libdl.so.2 is needed by elfutils-libs-0.179-1.fc32.i686
        libdl.so.2(GLIBC_2.0) is needed by elfutils-libs-0.179-1.fc32.i686
        libdl.so.2(GLIBC_2.1) is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1 is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1(ELFUTILS_1.0) is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1(ELFUTILS_1.1.1) is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1(ELFUTILS_1.3) is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1(ELFUTILS_1.4) is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1(ELFUTILS_1.5) is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1(ELFUTILS_1.6) is needed by elfutils-libs-0.179-1.fc32.i686
        libelf.so.1(ELFUTILS_1.7) is needed by elfutils-libs-0.179-1.fc32.i686
        liblzma.so.5 is needed by elfutils-libs-0.179-1.fc32.i686
        liblzma.so.5(XZ_5.0) is needed by elfutils-libs-0.179-1.fc32.i686
        libpthread.so.0 is needed by elfutils-libs-0.179-1.fc32.i686
        libpthread.so.0(GLIBC_2.0) is needed by elfutils-libs-0.179-1.fc32.i686
        libpthread.so.0(GLIBC_2.1) is needed by elfutils-libs-0.179-1.fc32.i686
        libpthread.so.0(GLIBC_2.2) is needed by elfutils-libs-0.179-1.fc32.i686
        libz.so.1 is needed by elfutils-libs-0.179-1.fc32.i686
        libz.so.1(ZLIB_1.2.2.3) is needed by elfutils-libs-0.179-1.fc32.i686

Try with elfutils-libs-0.179-1.fc32.x86_64.rpm

1 Like

I could only reinstall it by using the --force command.

   [christian@localhost Downloads]$ sudo rpm -iv --force  elfutils-libelf-0.179-1.fc32.x86_64.rpm
    Verifying packages...
    Preparing packages...
    elfutils-libelf-0.179-1.fc32.x86_64
    /sbin/ldconfig: File /lib64/libbluetooth.so.3.19.3 is empty, not checked.
    /sbin/ldconfig: File /lib64/libasm-0.181.so is empty, not checked.
    /sbin/ldconfig: File /lib64/libasm.so.1 is empty, not checked.
    /sbin/ldconfig: File /lib64/libdw-0.181.so is empty, not checked.
    /sbin/ldconfig: File /lib64/libbluetooth.so.3 is empty, not checked.
    /sbin/ldconfig: File /lib64/libdw.so.1 is empty, not checked.
    /sbin/ldconfig: File /lib64/libenchant-2.so.2.2.11 is empty, not checked.
    /sbin/ldconfig: File /lib64/libdebuginfod-0.181.so is empty, not checked.
    /sbin/ldconfig: File /lib64/libenchant-2.so.2 is empty, not checked.
    /sbin/ldconfig: File /lib64/libdebuginfod.so.1 is empty, not checked.

Unfortunately dnf update fails again. :frowning:

[christian@localhost Downloads]$ sudo dnf update --skip-broken
Last metadata expiration check: 0:00:42 ago on Tue 29 Sep 2020 11:51:02.
Error:
Problem 1: package kernel-5.8.4-200.fc32.x86_64 requires kernel-core-uname-r = 5.8.4-200.fc32.x86_64, but none of the providers can be installed

  • conflicting requests
    Problem 2: package kernel-modules-extra-5.8.4-200.fc32.x86_64 requires kernel-uname-r = 5.8.4-200.fc32.x86_64, but none of the providers can be installed
  • conflicting requests

Is my installation totally broken?

Mmm, the latest version is elfutils-libs-0.181-1.fc32.x86_64.rpm

At least, now, dnf works.

Try with sudo dnf distrosync
What happens?

1 Like

Out of curiosity, what is the result of this command?

file /lib64/libbluetooth.so.3.19.3

Finally I installed v181 by using the --force command again.

Now I got these errors:

> [christian@localhost Downloads]$ sudo dnf distrosync --skip-broken
> Last metadata expiration check: 0:11:18 ago on Tue 29 Sep 2020 11:51:02.
> Error:
>  Problem 1: package kernel-5.8.4-200.fc32.x86_64 requires kernel-core-uname-r = 5.8.4-200.fc32.x86_64, but none of the providers can be installed
>   - conflicting requests
>  Problem 2: package kernel-modules-extra-5.8.4-200.fc32.x86_64 requires kernel-uname-r = 5.8.4-200.fc32.x86_64, but none of the providers can be installed
>   - conflicting requests

And the result of this command:

uname -a
[christian@localhost Downloads]$ uname -a
Linux localhost.localdomain 5.8.6-201.fc32.x86_64 #1 SMP Fri Sep 4 03:27:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

And

sudo dnf info kernel
[christian@localhost Downloads]$ sudo dnf info kernel
Last metadata expiration check: 0:19:41 ago on Tue 29 Sep 2020 11:51:02.
Installed Packages
Name         : kernel
Version      : 5.7.17
Release      : 200.fc32
Architecture : x86_64
Size         : 0.0
Source       : kernel-5.7.17-200.fc32.src.rpm
Repository   : @System
From repo    : @System
Summary      : The Linux kernel
URL          : https://www.kernel.org/
License      : GPLv2 and Redistributable, no modification permitted
Description  : The kernel meta package

Name         : kernel
Version      : 5.8.4
Release      : 200.fc32
Architecture : x86_64
Size         : 0.0
Source       : kernel-5.8.4-200.fc32.src.rpm
Repository   : @System
From repo    : updates
Summary      : The Linux kernel
URL          : https://www.kernel.org/
License      : GPLv2 and Redistributable, no modification permitted
Description  : The kernel meta package

Name         : kernel
Version      : 5.8.6
Release      : 201.fc32
Architecture : x86_64
Size         : 0.0
Source       : kernel-5.8.6-201.fc32.src.rpm
Repository   : @System
From repo    : updates
Summary      : The Linux kernel
URL          : https://www.kernel.org/
License      : GPLv2 and Redistributable, no modification permitted
Description  : The kernel meta package

Available Packages
Name         : kernel
Version      : 5.8.11
Release      : 200.fc32
Architecture : x86_64
Size         : 25 k
Source       : kernel-5.8.11-200.fc32.src.rpm
Repository   : updates
Summary      : The Linux kernel
URL          : https://www.kernel.org/
License      : GPLv2 and Redistributable, no modification permitted
Description  : The kernel meta package

Mmm.
Well, since you are running 5.8.6-201 kernel, you can safely remove all the packages related to kernel 5.8.4-200
Try to run this command, but before confirming, please paste here the result.

sudo dnf remove kernel-*5.8.4-200*
1 Like
[christian@localhost ~]$ sudo dnf remove kernel-*5.8.4-200*
Dependencies resolved.
================================================================================
 Package        Architecture   Version                   Repository        Size
================================================================================
Removing:
 kernel         x86_64         5.8.4-200.fc32            @updates           0

Transaction Summary
================================================================================
Remove  1 Package

Freed space: 0
Is this ok [y/N]: n
Operation aborted.
[christian@localhost ~]$

Go with y
Then retry dnf update

ok, there’s just one error left.

 [christian@localhost ~]$ sudo dnf update --skip-broken
    Last metadata expiration check: 0:39:03 ago on Tue 29 Sep 2020 11:51:02.
    Error:
     Problem: package kernel-modules-extra-5.8.4-200.fc32.x86_64 requires kernel-uname-r = 5.8.4-200.fc32.x86_64, but none of the providers can be installed
      - conflicting requests