Dnf update fails again (libasm/libdw missing, cannot be re-installed)

Hello @all,

Again I’m having issues in performing a dnf update. It says `libdw.so.1: cannot open shared library’.
So I tried to re-install the elfutils lib by using the ‘rpm’ command, which finished without an error message. Nevertheless the libdw/lobasm libraries are still missing on my system. What can I do?

Yours Chris

[christian@localhost Downloads]$ 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: libdw.so.1: cannot open shared object file: No such file or directory

 sudo rpm -iv elfutils-libelf-0.181-1.fc32.x86_64.rpm
Verifying packages...
Preparing packages...
        package elfutils-libelf-0.181-1.fc32.x86_64 is already installed

 sudo rpm -iv --force elfutils-libelf-0.181-1.fc32.x86_64.rpm
Verifying packages...
Preparing packages...
elfutils-libelf-0.181-1.fc32.x86_64

sudo  rpmverify elfutils-libs
missing     /usr/lib64/libasm-0.181.so
missing     /usr/lib64/libasm.so.1
missing     /usr/lib64/libdw-0.181.so
missing     /usr/lib64/libdw.so.1
1 Like

Try to use the option --reinstall, or --erase and --install again.

didn’t help :frowning:

 [christian@localhost Downloads]$  sudo rpm --reinstall ./elfutils-libelf-0.181-1.fc32.x86_64.rpm
 [christian@localhost Downloads]$ sudo  rpmverify elfutils-libs
    missing     /usr/lib64/libasm-0.181.so
    missing     /usr/lib64/libasm.so.1
    missing     /usr/lib64/libdw-0.181.so
    missing     /usr/lib64/libdw.so.1
1 Like

hm, that’s very strange, isn’t it?

[christian@localhost Downloads]$  sudo rpm --erase ./elfutils-libelf-0.181-1.fc32.x86_64.rpm
error: package ./elfutils-libelf-0.181-1.fc32.x86_64.rpm is not installed
[christian@localhost Downloads]$  sudo rpm --install ./elfutils-libelf-0.181-1.fc32.x86_64.rpm
        package elfutils-libelf-0.181-1.fc32.x86_64 is already installed
[christian@localhost Downloads]$
1 Like
> sudo dnf download elfutils-libelf
Last metadata expiration check: 2:11:52 ago on Thu 15 Oct 2020 09:10:02 AM MSK.
[SKIPPED] elfutils-libelf-0.181-1.fc32.i686.rpm: Already downloaded           
[SKIPPED] elfutils-libelf-0.181-1.fc32.x86_64.rpm: Already downloaded         
> sudo rpm --nodeps -e elfutils-libelf.{i686,x86_64}
> sudo rpm -q -a elfutils-libelf
> sudo rpm -i elfutils-libelf-\*
> sudo rpm -q -a elfutils-libelf
elfutils-libelf-0.181-1.fc32.x86_64
elfutils-libelf-0.181-1.fc32.i686
> sudo rpm -V -a elfutils-libelf

sudo dnf fails (see first post)

    [christian@localhost Downloads]$ sudo rpm --nodeps -e elfutils-libelf.{i686,x86_64}
error: package elfutils-libelf.i686 is not installed
[christian@localhost Downloads]$ sudo rpm -q -a elfutils-libelf
elfutils-libelf-0.181-1.fc32.x86_64
[christian@localhost Downloads]$ sudo rpm -i elfutils-libelf-\*
        package elfutils-libelf-0.181-1.fc32.x86_64 is already installed
[christian@localhost Downloads]$ sudo rpm -q -a elfutils-libelf
elfutils-libelf-0.181-1.fc32.x86_64
[christian@localhost Downloads]$ sudo rpm -V -a elfutils-libelf
1 Like

Apparently you have only one arch, so modify the commands accordingly:

sudo rpm --nodeps -e elfutils-libelf
sudo rpm -q -a elfutils-libelf

Verify that no more packages left, and then you can reinstall it.