Troubles with dnf / python dependencies or dnf is brocken

$ type -p dnf
/usr/bin/dnf

$ readlink -f $(type -p dnf)
/usr/bin/dnf-3

$ rpm -q -f $(readlink -f $(type -p dnf))
python3-dnf-4.2.7-2.fc30.noarch
1 Like

I did it, but I’m still getting error : “sudo: unable to execute /usr/bin/dnf: No such file or directory”

1 Like

Verify all the installed packages:

sudo rpm --verify --all

And make sure the binary exists and matches the kernel:

file $(readlink -f $(type -p python3))
uname -a

In general, we need to check:

  • Is this an alias or not and how exactly the command is resolved by the shell.
  • Is the symlink valid and where it points to.
  • Does the user have the necessary permissions to access and run the symlink, script and binary.
  • Does the binary match the kernel arch.

If everything is fine, it should look like this:
https://paste.fedoraproject.org/paste/Acr9mYDttHqPttVbqyiM6g

1 Like

Thank you Francisco! :slightly_smiling_face:

It started with troubles with jupyter notebooks: I could not use it and I thought it was because of some incompatibilities with Python 3.7. That’s why I decided to install Python 3.5 instead of that. Probably I did it not in nice way and deleted some important packages, which were needed for dnf :see_no_evil:
To you question about virtual environments: I was using virtualenv.

Output to fpaste --sysinfo:
bash: /usr/bin/register-python-argcomplete: /usr/bin/python3: bad interpreter: No such file or directory

Thank you Vladislav :slight_smile:

Output to sudo rpm --verify --all doesn’t look very well:

missing /usr/lib64/python3.7/site-packages/pycache
missing /usr/lib64/python3.7/site-packages/pycache/audit.cpython-37.opt-1.pyc
missing /usr/lib64/python3.7/site-packages/pycache/audit.cpython-37.pyc
missing /usr/lib64/python3.7/site-packages/_audit.so
missing /usr/lib64/python3.7/site-packages/audit.py
missing /usr/lib64/python3.7/site-packages/auparse.so
missing /usr/lib/python3.7/site-packages/firewall
missing /usr/lib/python3.7/site-packages/firewall/init.py
missing /usr/lib/python3.7/site-packages/firewall/pycache
missing /usr/lib/python3.7/site-packages/firewall/pycache/init.cpython-37.opt-1.pyc
missing /usr/lib/python3.7/site-packages/firewall/pycache/init.cpython-37.pyc
missing /usr/lib/python3.7/site-packages/firewall/pycache/client.cpython-37.opt-1.pyc

–and more other

Output to rpm -q -f (readlink -f (type -p dnf python python2 python3)):
python3-dnf-4.2.2-2.fc30.noarch
python2-2.7.16-2.fc30.x86_64

Output to type -p dnf python python2 python3:
/usr/bin/dnf
/usr/bin/python2

Output to uname -a:
Linux localhost.localdomain 5.2.9-200.fc30.x86_64 #1 SMP Fri Aug 16 21:37:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

You need to reinstall all the packages which have missing files.

For example:

Finding the package, which provides the missing file:

$ rpm -qf /usr/lib/python3.7/site-packages/firewall
python3-firewall-0.6.4-2.fc30.noarch

So, you need to manually download and reinstall python3-firewall.

You can download packages here from the Fedora Updates repository:
https://fedora.pkgs.org/

And install them using rpm:

sudo rpm -i -v --replacepkgs /path/to/*.rpm

Then repeat the verification until all the errors are gone.

1 Like

Is it okay, that by command sudo rpm -i python3-firewall-0.6.4-2.fc30.noarch.rpm
I’m getting message " package python3-firewall-0.6.4-2.fc30.noarch is already installed"?

I’m getting this message by installation of most of packages

Use forceful install:

sudo rpm -i -v --replacepkgs /path/to/*.rpm
1 Like

Have you deactivated the virtual environment? dnf etc may not be available in it, since it changes the module paths where python finds its packages.

1 Like

The virtual environment was deactivated

I already installed some packages and still need to install some packages…

Now it does look a bit better:

1 Like

Please, post the whole output as text:

sudo rpm --verify --all

So, we can determine if any related file is missing or corrupted.

1 Like

The output to sudo rpm --verify --all:

missing     /usr/lib64/python3.7/site-packages/pyanaconda/modules/services/__pycache__/constants.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/pyanaconda/modules/storage/snapshot/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/pyzmq-17.0.0-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/zmq
missing     /usr/lib64/python3.7/site-packages/zmq/backend/cffi/_cdefs.h
missing     /usr/lib64/python3.7/site-packages/zmq/ssh/__pycache__
missing     /usr/lib64/python3.7/site-packages/zmq/ssh/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/zmq/ssh/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/_dbus_bindings.so
missing     /usr/lib64/python3.7/site-packages/_dbus_glib_bindings.so
missing     /usr/lib64/python3.7/site-packages/dbus
missing     /usr/lib/python3.7/site-packages/nbconvert
missing     /usr/lib/python3.7/site-packages/nbconvert-5.4.1-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/nbconvert-5.4.1-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/nbconvert-5.4.1-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/nbconvert-5.4.1-py3.7.egg-info/dependency_links.txt
missing     /usr/lib/python3.7/site-packages/nbconvert/__pycache__
missing     /usr/lib/python3.7/site-packages/nbconvert/exporters/tests/__pycache__/test_rst.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/nbconvert/exporters/tests/__pycache__/test_rst.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/nbconvert/exporters/tests/__pycache__/test_script.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/nbconvert/exporters/tests/__pycache__/test_script.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/Crypto
missing     /usr/lib64/python3.7/site-packages/Crypto/Cipher
missing     /usr/lib64/python3.7/site-packages/pycrypto-2.6.1-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/__pycache__/_pyrsistent_version.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/_pyrsistent_version.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/_pyrsistent_version.py
missing     /usr/lib64/python3.7/site-packages/pvectorc.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/pyrsistent
missing     /usr/lib64/python3.7/site-packages/pyrsistent-0.15.4-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/pyrsistent-0.15.4-py3.7.egg-info/PKG-INFO
missing     /usr/lib64/python3.7/site-packages/pyrsistent-0.15.4-py3.7.egg-info/SOURCES.txt
missing     /usr/lib64/python3.7/site-packages/pyrsistent-0.15.4-py3.7.egg-info/dependency_links.txt
missing     /usr/lib64/python3.7/site-packages/pyrsistent-0.15.4-py3.7.egg-info/requires.txt
missing     /usr/lib64/python3.7/site-packages/pyrsistent-0.15.4-py3.7.egg-info/top_level.txt
missing     /usr/lib64/python3.7/site-packages/pyrsistent/__init__.py
missing     /usr/lib64/python3.7/site-packages/pyrsistent/_pset.py
.......T.    /boot/efi/EFI/fedora/fwupx64.efi
missing     /usr/lib/python3.7/site-packages/Mako-1.0.12.dev0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/Mako-1.0.12.dev0-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/Mako-1.0.12.dev0-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/mako
missing     /usr/lib/python3.7/site-packages/mako/__init__.py
missing     /usr/lib/python3.7/site-packages/mako/__pycache__
missing     /usr/lib/python3.7/site-packages/mako/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/blivet_gui-2.1.11-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/blivetgui
missing     /usr/lib/python3.7/site-packages/blivetgui/__init__.py
missing     /usr/lib/python3.7/site-packages/pexpect
missing     /usr/lib/python3.7/site-packages/pexpect-4.6.0-py3.7.egg-info
.M.......  g /var/lib/clamav/bytecode.cld
.M.......  g /var/lib/clamav/daily.cld
.M.......  g /var/lib/clamav/mirrors.dat
missing     /usr/lib64/python3.7/site-packages/gi/_gi_cairo.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/bytesize
missing     /usr/lib64/python3.7/site-packages/bytesize/__init__.py
missing     /usr/lib64/python3.7/site-packages/bytesize/__pycache__
missing     /usr/lib64/python3.7/site-packages/bytesize/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/bytesize/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/bytesize/__pycache__/bytesize.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/bytesize/__pycache__/bytesize.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/bytesize/bytesize.py
missing     /usr/lib/python3.7/site-packages/constantly
missing     /usr/lib/python3.7/site-packages/constantly-15.1.0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/constantly/__init__.py
missing     /usr/lib/python3.7/site-packages/constantly/__pycache__
missing     /usr/lib/python3.7/site-packages/constantly/_version.py
S.5....T.  c /etc/selinux/targeted/contexts/files/file_contexts.local
..5....T.    /var/lib/selinux/targeted/active/commit_num
S.5....T.    /var/lib/selinux/targeted/active/file_contexts
.......T.    /var/lib/selinux/targeted/active/homedir_template
S.5....T.    /var/lib/selinux/targeted/active/policy.kern
.M.......  g /var/lib/selinux/targeted/active/policy.linked
.......T.    /var/lib/selinux/targeted/active/seusers
.......T.    /var/lib/selinux/targeted/active/users_extra
missing     /usr/lib/python3.7/site-packages/enchant
missing     /usr/lib/python3.7/site-packages/enchant/__init__.py
missing     /usr/lib64/python3.7/site-packages/cffi/__pycache__/vengine_cpy.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/cffi/__pycache__/vengine_gen.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/cffi/recompiler.py
missing     /usr/lib64/python3.7/site-packages/cffi/setuptools_ext.py
missing     /usr/lib64/python3.7/site-packages/cffi/vengine_cpy.py
missing     /usr/lib64/python3.7/site-packages/cffi/vengine_gen.py
missing     /usr/lib64/python3.7/site-packages/cffi/verifier.py
missing     /usr/lib/python3.7/site-packages/jedi
missing     /usr/lib/python3.7/site-packages/jedi-0.12.1-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/numexpr
missing     /usr/lib64/python3.7/site-packages/numexpr/interpreter.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/numexpr/necompiler.py
missing     /usr/lib/python3.7/site-packages/__pycache__/simplegeneric.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/simplegeneric.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/simplegeneric-0.8.1-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/simplegeneric-0.8.1-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/simplegeneric-0.8.1-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/simplegeneric-0.8.1-py3.7.egg-info/dependency_links.txt
missing     /usr/lib/python3.7/site-packages/simplegeneric-0.8.1-py3.7.egg-info/top_level.txt
missing     /usr/lib/python3.7/site-packages/simplegeneric.py
missing     /usr/lib64/python3.7/site-packages/speechd
missing     /usr/lib64/python3.7/site-packages/speechd/client.py
missing     /usr/lib64/python3.7/site-packages/speechd/paths.py
missing     /usr/lib64/python3.7/site-packages/speechd_config
missing     /usr/lib64/python3.7/site-packages/MarkupSafe-1.1.1-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/MarkupSafe-1.1.1-py3.7.egg-info/PKG-INFO
missing     /usr/lib64/python3.7/site-packages/MarkupSafe-1.1.1-py3.7.egg-info/SOURCES.txt
missing     /usr/lib64/python3.7/site-packages/MarkupSafe-1.1.1-py3.7.egg-info/dependency_links.txt
missing     /usr/lib64/python3.7/site-packages/MarkupSafe-1.1.1-py3.7.egg-info/top_level.txt
missing     /usr/lib64/python3.7/site-packages/markupsafe
missing     /usr/lib64/python3.7/site-packages/markupsafe/_constants.py
missing     /usr/lib64/python3.7/site-packages/markupsafe/_native.py
missing     /usr/lib64/python3.7/site-packages/markupsafe/_speedups.cpython-37m-x86_64-linux-gnu.so
.M.......  g /usr/share/fonts/liberation/.uuid
missing     /usr/lib/python3.7/site-packages/attr
missing     /usr/lib/python3.7/site-packages/attr/__init__.py
missing     /usr/lib/python3.7/site-packages/attr/__pycache__/filters.cpython-37.pyc
missing     /var/log/teamviewer14
missing     /usr/lib64/python3.7/site-packages/__pycache__/snack.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/snack.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/_snack.so
missing     /usr/lib64/python3.7/site-packages/snack.py
missing     /usr/lib/python3.7/site-packages/__pycache__/entrypoints.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/entrypoints.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/entrypoints-0.3.dist-info
missing     /usr/lib/python3.7/site-packages/authselect
missing     /var/log/libvirt/qemu
missing     /var/log/swtpm/libvirt/qemu
.M.......  g /var/run/libvirt/qemu
missing     /usr/lib64/python3.7/site-packages/wrapt
missing     /usr/lib64/python3.7/site-packages/wrapt-1.11.1-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/wrapt/__init__.py
.M.......  g /usr/share/fonts/google-noto-emoji/.uuid
missing     /usr/lib/python3.7/site-packages/CairoSVG-1.0.20-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/cairosvg
missing     /usr/lib/python3.7/site-packages/cairosvg/__init__.py
missing     /usr/lib/python3.7/site-packages/cairosvg/surface/text.py
missing     /usr/lib/python3.7/site-packages/cairosvg/surface/units.py
.M....G..    /var/log/gdm
missing     /usr/lib/python3.7/site-packages/iniparse
missing     /usr/lib/python3.7/site-packages/iniparse-0.4-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/iniparse/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/prometheus_client
missing     /usr/lib/python3.7/site-packages/prometheus_client-0.6.0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/prometheus_client-0.6.0-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/prometheus_client-0.6.0-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/prometheus_client/__init__.py
missing     /usr/lib/python3.7/site-packages/prometheus_client/twisted/_exposition.py
missing     /usr/lib/python3.7/site-packages/prometheus_client/utils.py
missing     /usr/lib/python3.7/site-packages/prometheus_client/values.py
missing     /usr/lib/python3.7/site-packages/hyperlink
missing     /usr/lib/python3.7/site-packages/slip
missing     /usr/lib/python3.7/site-packages/slip-0.6.4-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/slip/__init__.py
missing     /usr/lib/python3.7/site-packages/slip/__pycache__
missing     /usr/lib/python3.7/site-packages/__pycache__/requests_file.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/requests_file.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/requests_file-1.4.3-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/requests_file-1.4.3-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/requests_file-1.4.3-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/requests_file-1.4.3-py3.7.egg-info/dependency_links.txt
missing     /usr/lib/python3.7/site-packages/requests_file-1.4.3-py3.7.egg-info/requires.txt
missing     /usr/lib/python3.7/site-packages/requests_file-1.4.3-py3.7.egg-info/top_level.txt
missing     /usr/lib/python3.7/site-packages/requests_file.py
missing     /usr/lib/python3.7/site-packages/Mozo
missing     /usr/lib/python3.7/site-packages/Mozo/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/Mozo/__pycache__/config.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/Mozo/__pycache__/config.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/Mozo/__pycache__/util.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/Mozo/__pycache__/util.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/Mozo/config.py
missing     /usr/lib/python3.7/site-packages/Mozo/util.py
missing     /usr/lib/python3.7/site-packages/beautifulsoup4-4.6.3-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/bs4
missing     /usr/lib/python3.7/site-packages/bs4/__init__.py
missing     /usr/lib/python3.7/site-packages/bs4/tests/__pycache__/test_builder_registry.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/bs4/tests/__pycache__/test_docs.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/bs4/tests/test_tree.py
missing     /usr/lib64/python3.7/site-packages/abrtcli
missing     /usr/lib64/python3.7/site-packages/abrtcli/__init__.py
missing     /usr/lib64/python3.7/site-packages/abrtcli/__pycache__
missing     /usr/lib/python3.7/site-packages/testpath
missing     /usr/lib/python3.7/site-packages/testpath-0.3.1.dist-info
missing     /usr/lib/python3.7/site-packages/testpath-0.3.1.dist-info/INSTALLER
missing     /usr/lib/python3.7/site-packages/testpath-0.3.1.dist-info/LICENSE
missing     /usr/lib/python3.7/site-packages/testpath-0.3.1.dist-info/METADATA
missing     /usr/lib/python3.7/site-packages/testpath-0.3.1.dist-info/RECORD
missing     /usr/lib/python3.7/site-packages/testpath-0.3.1.dist-info/WHEEL
missing     /usr/lib/python3.7/site-packages/testpath/__init__.py
missing     /var/log/cups
missing     /usr/lib/python3.7/site-packages/traitlets/utils/__pycache__/importstring.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/traitlets/utils/tests
missing     /usr/lib/python3.7/site-packages/javapackages-5.3.0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/idna
missing     /usr/lib/python3.7/site-packages/idna-2.7-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/idna-2.7-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/idna-2.7-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/idna-2.7-py3.7.egg-info/dependency_links.txt
missing     /usr/lib/python3.7/site-packages/idna-2.7-py3.7.egg-info/top_level.txt
missing     /usr/lib/python3.7/site-packages/idna/__init__.py
missing     /usr/lib/python3.7/site-packages/idna/__pycache__
missing     /usr/lib/python3.7/site-packages/idna/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/idna/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/idna/intranges.py
missing     /usr/lib/python3.7/site-packages/idna/package_data.py
missing     /usr/lib/python3.7/site-packages/idna/uts46data.py
missing     /usr/lib/python3.7/site-packages/olefile
missing     /usr/lib/python3.7/site-packages/olefile-0.46-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/olefile-0.46-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/olefile-0.46-py3.7.egg-info/top_level.txt
missing     /usr/lib/python3.7/site-packages/olefile/__init__.py
missing     /usr/lib/python3.7/site-packages/olefile/__pycache__/olefile.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/olefile/olefile.py
missing     /usr/lib/python3.7/site-packages/requests
missing     /usr/lib/python3.7/site-packages/requests-2.21.0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/requests-2.21.0-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/requests-2.21.0-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/pyatspi/__pycache__/atspienum.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/pyatspi/__pycache__/collection.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/torbrowser_launcher/__init__.py
missing     /usr/lib/python3.7/site-packages/torbrowser_launcher/__pycache__
missing     /usr/lib/python3.7/site-packages/torbrowser_launcher/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/torbrowser_launcher/settings.py
missing     /usr/lib/python3.7/site-packages/__pycache__/pyinotify.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/pyinotify.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/pyinotify-0.9.6-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/pyinotify-0.9.6-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/pyinotify.py
missing     /usr/lib/python3.7/site-packages/python_xlib-0.23-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/python_xlib-0.23-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/python_xlib-0.23-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/python_xlib-0.23-py3.7.egg-info/dependency_links.txt
missing     /usr/lib/python3.7/site-packages/python_xlib-0.23-py3.7.egg-info/requires.txt
missing     /usr/lib/python3.7/site-packages/python_xlib-0.23-py3.7.egg-info/top_level.txt
missing     /usr/lib64/python3.7/site-packages/lxml
missing     /usr/lib64/python3.7/site-packages/lxml/html/ElementSoup.py
missing     /usr/lib64/python3.7/site-packages/lxml/html/__init__.py
missing     /usr/lib64/python3.7/site-packages/lxml/html/__pycache__
missing     /usr/lib64/python3.7/site-packages/lxml/html/__pycache__/ElementSoup.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/lxml/html/__pycache__/ElementSoup.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/lxml/html/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/lxml/html/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/dmidecode.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/dmidecode.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/dmidecode.py
missing     /usr/lib64/python3.7/site-packages/dmidecodemod.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/python_dmidecode-3.12.2-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/librepo
missing     /usr/lib64/python3.7/site-packages/librepo/__init__.py
missing     /usr/lib64/python3.7/site-packages/librepo/__pycache__
missing     /usr/lib64/python3.7/site-packages/librepo/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/librepo/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/librepo/_librepo.so
missing     /usr/lib64/python3.7/site-packages/__pycache__/officehelper.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/officehelper.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/uno.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/uno.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/unohelper.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/unohelper.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/officehelper.py
missing     /usr/lib64/python3.7/site-packages/uno.py
missing     /usr/lib64/python3.7/site-packages/unohelper.py
missing     /usr/lib/python3.7/site-packages/chrome_gnome_shell-0.0.0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/slip.dbus-0.6.4-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/slip/dbus
missing     /usr/lib/python3.7/site-packages/slip/dbus/__init__.py
missing     /usr/lib/python3.7/site-packages/slip/dbus/__pycache__/proxies.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/slip/dbus/mainloop.py
missing     /usr/lib/python3.7/site-packages/slip/dbus/polkit.py
missing     /usr/lib/python3.7/site-packages/slip/dbus/proxies.py
missing     /usr/lib/python3.7/site-packages/slip/dbus/service.py
missing     /usr/lib/python3.7/site-packages/dnfdragora/__pycache__/updater.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/dnfdragora/__pycache__/updater.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/dnfdragora/updater.py
missing     /usr/lib/python3.7/site-packages/__pycache__/ntplib.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/ntplib.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/ntplib-0.3.3-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/ntplib.py
missing     /usr/lib/python3.7/site-packages/defusedxml
missing     /usr/lib/python3.7/site-packages/defusedxml/__pycache__/lxml.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/defusedxml/__pycache__/lxml.cpython-37.pyc
.M.......  g /boot/System.map-5.1.16-300.fc30.x86_64
.M.......  g /boot/initramfs-5.1.16-300.fc30.x86_64.img
.M.......  g /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf
missing     /usr/lib64/python3.7/site-packages/rpm
missing     /usr/lib64/python3.7/site-packages/rpm-4.14.2.1-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/rpm/__init__.py
missing     /usr/lib64/python3.7/site-packages/rpm/__pycache__
missing     /usr/lib64/python3.7/site-packages/rpm/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/rpm/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/rpm/__pycache__/transaction.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/rpm/__pycache__/transaction.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/rpm/_rpm.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/rpm/_rpmb.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/rpm/_rpms.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/rpm/transaction.py
.M.......  g /run/lock/ppp
.M.......  g /run/ppp
missing     /var/log/ppp
.M.......  g /usr/share/fonts/opensymbol/.uuid
missing     /var/log/tor
missing     /usr/lib64/python3.7/site-packages/PIL
missing     /usr/lib64/python3.7/site-packages/PIL/_util.py
missing     /usr/lib64/python3.7/site-packages/PIL/_version.py
missing     /usr/lib64/python3.7/site-packages/PIL/_webp.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/PIL/features.py
missing     /usr/lib64/python3.7/site-packages/Pillow-5.4.1-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/Pillow-5.4.1-py3.7.egg-info/PKG-INFO
missing     /usr/lib64/python3.7/site-packages/report
missing     /usr/lib64/python3.7/site-packages/report/_py3report.so
missing     /usr/lib64/python3.7/site-packages/report/accountmanager.py
missing     /usr/lib64/python3.7/site-packages/report/io
missing     /usr/lib64/python3.7/site-packages/report/io/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/report/io/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/reportclient
missing     /usr/lib64/python3.7/site-packages/reportclient/__init__.py
missing     /usr/lib64/python3.7/site-packages/reportclient/__pycache__
missing     /usr/lib64/python3.7/site-packages/reportclient/yumdebuginfo.py
missing     /usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/spokes/custom_storage.py
missing     /usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/spokes/lib/__pycache__/accordion.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/xkl_wrapper.py
missing     /usr/lib64/python3.7/site-packages/__pycache__/drv_libxml2.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/drv_libxml2.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/drv_libxml2.py
missing     /usr/lib64/python3.7/site-packages/libxml2.py
missing     /usr/lib64/python3.7/site-packages/libxml2mod.so
S.5....T.  c /etc/texlive/web2c/updmap.cfg
S.5....T.  c /var/lib/unbound/root.key
S.5....T.    /usr/bin/pygmentize
missing     /usr/lib/python3.7/site-packages/Pygments-2.2.0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/Pygments-2.2.0-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/Pygments-2.2.0-py3.7.egg-info/not-zip-safe
missing     /usr/lib/python3.7/site-packages/Pygments-2.2.0-py3.7.egg-info/top_level.txt
missing     /usr/lib/python3.7/site-packages/pygments/lexers
missing     /usr/lib/python3.7/site-packages/pygments/styles
missing     /usr/lib/python3.7/site-packages/pygments/styles/__pycache__/algol_nu.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/pygments/styles/__pycache__/algol_nu.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/pygments/token.py
missing     /usr/lib/python3.7/site-packages/pygments/unistring.py
missing     /usr/lib/python3.7/site-packages/pygments/util.py
missing     /usr/lib/python3.7/site-packages/__pycache__/six.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/six.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/six-1.12.0.dist-info
missing     /usr/lib/python3.7/site-packages/six-1.12.0.dist-info/WHEEL
missing     /usr/lib/python3.7/site-packages/six-1.12.0.dist-info/top_level.txt
missing     /usr/lib/python3.7/site-packages/six.py
missing     /var/log/pluto
missing     /var/log/pluto/peer
missing     /usr/lib64/python3.7/site-packages/__pycache__/tevent.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/tevent.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/_tevent.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/tevent.py
missing     /usr/lib/python3.7/site-packages/__pycache__/pickleshare.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/pickleshare.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/pickleshare-0.7.4-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/pickleshare-0.7.4-py3.7.egg-info/PKG-INFO
missing     /usr/lib/python3.7/site-packages/pickleshare-0.7.4-py3.7.egg-info/SOURCES.txt
missing     /usr/lib/python3.7/site-packages/pickleshare-0.7.4-py3.7.egg-info/dependency_links.txt
missing     /usr/lib/python3.7/site-packages/pickleshare-0.7.4-py3.7.egg-info/requires.txt
missing     /usr/lib/python3.7/site-packages/pickleshare-0.7.4-py3.7.egg-info/top_level.txt
missing     /usr/lib/python3.7/site-packages/pickleshare.py
.......T.    /boot/efi/EFI/fedora/grubx64.efi
missing     /usr/lib/python3.7/site-packages/__pycache__/pycanberra.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/pycanberra.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/pycanberra.py
missing     /usr/lib64/python3.7/site-packages/problem
missing     /usr/lib64/python3.7/site-packages/problem/__init__.py
missing     /usr/lib64/python3.7/site-packages/problem/__pycache__
missing     /usr/lib64/python3.7/site-packages/problem/config.py
missing     /usr/lib64/python3.7/site-packages/problem/exception.py
missing     /usr/lib64/python3.7/site-packages/problem/proxies.py
missing     /usr/lib64/python3.7/site-packages/problem/tools.py
missing     /usr/lib64/python3.7/site-packages/problem/watch.py
missing     /var/log/samba
missing     /var/log/samba/old
.......T.    /boot/efi/EFI/fedora/gcdx64.efi
.M.......  c /etc/fstab
.M....G..  g /var/log/lastlog
missing     /usr/lib/python3.7/site-packages/ptyprocess
missing     /usr/lib/python3.7/site-packages/ptyprocess-0.6.0-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/ptyprocess/__init__.py
missing     /usr/lib/python3.7/site-packages/ptyprocess/__pycache__
missing     /usr/lib/python3.7/site-packages/ptyprocess/__pycache__/__init__.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/ptyprocess/__pycache__/__init__.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/ptyprocess/__pycache__/util.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/ptyprocess/__pycache__/util.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/ptyprocess/_fork_pty.py
missing     /usr/lib/python3.7/site-packages/ptyprocess/ptyprocess.py
missing     /usr/lib/python3.7/site-packages/ptyprocess/util.py
.M.......  g /usr/share/fonts/thai-scalable/.uuid
missing     /usr/lib64/python3.7/site-packages/gi/overrides/Gedit.py
missing     /usr/lib64/python3.7/site-packages/gi/overrides/__pycache__
missing     /usr/lib64/python3.7/site-packages/gi/overrides/__pycache__/Gedit.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/gi/overrides/__pycache__/Gedit.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/dnfdaemon/client
missing     /usr/lib/python3.7/site-packages/dnfdaemon/client/__init__.py
missing     /usr/lib64/python3.7/site-packages/__pycache__/pylab.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/pylab.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/matplotlib/__pycache__/blocking_input.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/matplotlib/backends/web_backend/css/page.css
missing     /usr/lib64/python3.7/site-packages/mpl_toolkits/axes_grid
missing     /usr/lib64/python3.7/site-packages/pylab.py
missing     /usr/lib64/python3.7/site-packages/__pycache__/yui.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/yui.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/_yui.so
missing     /usr/lib64/python3.7/site-packages/yui.py
.......T.    /usr/lib/python2.7/site-packages/backports/__init__.py
S.5....T.    /usr/lib/python2.7/site-packages/backports/__init__.pyc
.M.......  g /run/cryptsetup
missing     /usr/lib/python3.7/site-packages/setroubleshoot
missing     /usr/lib/python3.7/site-packages/setroubleshoot/__pycache__/browser.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/setroubleshoot/__pycache__/browser.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/setroubleshoot/__pycache__/gui_utils.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/setroubleshoot/__pycache__/gui_utils.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/setroubleshoot/browser.py
missing     /usr/lib/python3.7/site-packages/setroubleshoot/gui_utils.py
missing     /usr/lib/python3.7/site-packages/pyfros/plugins/__pycache__/screencastrecordmydesktop.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/pyfros/plugins/__pycache__/screencastrecordmydesktop.cpython-37.pyc
missing     /usr/lib/python3.7/site-packages/pyfros/plugins/screencastrecordmydesktop.py
missing     /usr/lib/python3.7/site-packages/IPy-0.81-py3.7.egg-info
missing     /usr/lib/python3.7/site-packages/IPy.py
missing     /usr/lib/python3.7/site-packages/__pycache__/IPy.cpython-37.opt-1.pyc
missing     /usr/lib/python3.7/site-packages/__pycache__/IPy.cpython-37.pyc
.M.......  g /usr/share/fonts/lohit-telugu/.uuid
missing     /usr/lib64/python3.7/site-packages/PyIscsi-1.0-py3.7.egg-info
missing     /usr/lib64/python3.7/site-packages/libiscsi.cpython-37m-x86_64-linux-gnu.so
.M.......  g /var/lock/iscsi
.M.......  g /var/lock/iscsi/lock
missing     /usr/lib64/python3.7/site-packages/__pycache__/semanage.cpython-37.opt-1.pyc
missing     /usr/lib64/python3.7/site-packages/__pycache__/semanage.cpython-37.pyc
missing     /usr/lib64/python3.7/site-packages/_semanage.cpython-37m-x86_64-linux-gnu.so
missing     /usr/lib64/python3.7/site-packages/semanage.py
S.5....T.  c /usr/lib64/R/etc/Makeconf
S.5....T.  c /usr/lib64/R/etc/ldpaths

But there are maybe not all packages which are missing, because cmd just showed limited amount of lines and that was over this limitation. Are this packages really missed if I got the message “is already installed” like 5 posts above?
Is it any chance that I can still can resque my fedora? Or should I reinstall the OS completely?:see_no_evil:

1 Like

Those should be critical.
Try to forcefully reinstall the python3-rpm package using the method described above.

I think, yes.
If we manage to fix DNF, it is much easier to reinstall the rest packages with:

sudo dnf reinstall python\*
sudo dnf reinstall /path/to/missing/file

So, it is not completely hopeless.

1 Like

I did install python3-rpm-4.14.2.1-5.fc30.x86_64.rpm package. I’ m getting the following message now despite I also installed packages gpgme-1.12.0-1.fc30.x86_64.rpm and gpgme-devel-1.12.0-1.fc30.x86_64.rpm:

Traceback (most recent call last):
File “/usr/bin/dnf”, line 57, in
from dnf.cli import main
File “/usr/lib/python3.7/site-packages/dnf/init.py”, line 30, in
import dnf.base
File “/usr/lib/python3.7/site-packages/dnf/base.py”, line 34, in
from dnf.db.history import SwdbInterface
File “/usr/lib/python3.7/site-packages/dnf/db/history.py”, line 28, in
from dnf.yum import misc
File “/usr/lib/python3.7/site-packages/dnf/yum/misc.py”, line 30, in
import dnf.crypto
File “/usr/lib/python3.7/site-packages/dnf/crypto.py”, line 38, in
import gpgme
ModuleNotFoundError: No module named ‘gpgme’

1 Like

It should be the package python3-gpg.

You can redirect the output into a file:

sudo rpm --verify --all > rpm.log

And post it to https://paste.fedoraproject.org/.

1 Like

Dnf works now again! :tada: Thank you very much! :blush:

Here is link to sudo rpm --verify --all > rpm.log:

https://paste.fedoraproject.org/paste/fOIy55nSPL-N9JW4jPnrQQ

1 Like

Glad to hear! :smile:
Now we should be able to restore most of the missing files like this:

sudo dnf --refresh upgrade
sudo dnf reinstall python\*
1 Like

That’s done :blush: So now it should be everything okay?

2 Likes

Check again to be sure:

sudo rpm --verify --all
1 Like