Search code examples
yumcentos6reinstall

yum stopped working with error No module named transactioninfo


Removed the following files by mistake and as a result yum stopped working.

Any idea what rpms exactly we need to re-install?

./abrt_exception_handler.pyo
./abrt_exception_handler.pyc
./abrt.pth
./abrt_exception_handler.py
./yum/sqlitesack.pyo
./yum/rpmsack.pyo
./yum/packages.pyo
./yum/misc.pyo
./yum/metalink.pyo
./yum/__init__.pyo
./yum/history.pyo
./yum/depsolve.pyo
./rpmUtils/miscutils.pyo
./yum/yumRepo.pyo
./yum/yumRepo.pyc
./yum/yumRepo.py
./yum/update_md.pyo
./yum/update_md.pyc
./yum/update_md.py
./yum/transactioninfo.pyo
./yum/transactioninfo.pyc
./yum/transactioninfo.py
./yum/sqlutils.pyo
./yum/sqlutils.pyc
./yum/sqlutils.py

Solution

  • Ok, found the solution. Since I don't know exactly which python modules belongs to which rpm, I did a re-install of most of the dependent rpms. Here it goes.

    #!/bin/bash
    
    for file in \
            elfutils-0.152-1.el6.x86_64.rpm \
            elfutils-libs-0.152-1.el6.x86_64.rpm \
            expat-2.0.1-11.el6_2.x86_64.rpm \
            gmp-4.3.1-7.el6_2.2.x86_64.rpm \
            libxml2-2.7.6-8.el6_3.4.x86_64.rpm \
            libxml2-python-2.7.6-8.el6_3.4.x86_64.rpm \
            m2crypto-0.20.2-9.el6.x86_64.rpm \
            python-2.6.6-36.el6.x86_64.rpm \
            python-iniparse-0.3.1-2.1.el6.noarch.rpm \
            python-urlgrabber-3.9.1-8.el6.noarch.rpm \
            readline-6.0-4.el6.x86_64.rpm \
            rpm-4.8.0-32.el6.x86_64.rpm \
            rpm-libs-4.8.0-32.el6.x86_64.rpm \
            rpm-python-4.8.0-32.el6.x86_64.rpm \
            sqlite-3.6.20-1.el6.x86_64.rpm \
            yum-3.2.29-40.el6.centos.noarch.rpm \
            yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
      do wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/$file;
    done
    
    rpm -Uvh *.rpm --force