0

错误地删除了以下文件,因此yum停止工作。

知道我们需要重新安装哪些 rpm 吗?

./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
4

1 回答 1

0

好的,找到了解决方案。由于我不确切知道哪些 python 模块属于哪个 rpm,所以我重新安装了大多数依赖的 rpm。就这样吧。

#!/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
于 2013-07-04T08:31:55.317 回答