Ask Your Question

Revision history [back]

dnf is likely broken on your system. Modern fedora uses python3, so you might use the following script to reinstall all python3 packages against a fedora mirror (worked for me on a fedora 28 test box):

echo "Reinstalling all python3 packages via rpm"
PACKAGES_FILE="packages.txt"
rpm -qa | grep python3 > $PACKAGES_FILE
echo "Placed all python3 packages in $PACKAGES_FILE"
ROOT_MIRROR_URL="https://mirror.chpc.utah.edu/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/p"
for PACKAGE in $(cat $PACKAGES_FILE); do
    echo "Grabbing $PACKAGE rpm"
    wget "$ROOT_MIRROR_URL/$PACKAGE.rpm"
    echo "Installing $PACKAGE rpm"
    rpm -Uvh --force $PACKAGE.rpm
done
echo "Done!"
rm $PACKAGES_FILE python3*.rpm