RHEL6安装了rpmforge的错误版本

我为el7安装了rpmforge的错误版本。 然后我运行了一个更新,在我的系统上安装了这个软件包

python-crypto-2.6.1-1.el7.rf.x86_64 

注意el7,但我在rhel6。 然后我意识到并删除了错误的存储库,并为el6安装了正确的存储库。

 $ rpm -qa | grep rpmfor rpmforge-release-0.5.2-2.el6.rf.x86_64 

但是上面的过程已经打破了更新过程,我知道我可以使用--skip-broken选项。 如何降级上述软件包。 我试图卸载并再次安装它,但我得到这个错误:

 Error: Trying to remove "c4ebpl", which is protected 

它显示了一些不能删除的保护包。 更新进程使用sudo yum update给我这个错误:

 Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: libgmp.so.10()(64bit) Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: libc.so.6(GLIBC_2.14)(64bit) Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: python(abi) = 2.7 Installed: python-2.6.6-52.el6.x86_64 (@el66/$releasever) python(abi) = 2.6 Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: libpython2.7.so.1.0()(64bit) You could try using --skip-broken to work around the problem 

有谁知道如何降级到原始包? 有没有办法做一个工厂重置? 还是我需要重新安装Linux?

我尝试了一些东西:我使用这个命令删除了python-crypto.x86_64软件包

 sudo rpm --nodeps -e python-crypto.x86_64 

并且更新通过了。 所以我想我应该安装python-crypto.x86_64包,因为我有正确的el6 rpmforge库。 所以我跑这个命令sudo yum install python-crypto.x86_64但我得到了同样的错误:

 Resolving Dependencies --> Running transaction check ---> Package python-crypto.x86_64 0:2.6.1-1.el7.rf will be installed --> Processing Dependency: python(abi) = 2.7 for package: python-crypto-2.6.1-1.el7.rf.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: python-crypto-2.6.1-1.el7.rf.x86_64 --> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: python-crypto-2.6.1-1.el7.rf.x86_64 --> Processing Dependency: libgmp.so.10()(64bit) for package: python-crypto-2.6.1-1.el7.rf.x86_64 --> Finished Dependency Resolution Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: libgmp.so.10()(64bit) Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: libc.so.6(GLIBC_2.14)(64bit) Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: python(abi) = 2.7 Installed: python-2.6.6-52.el6.x86_64 (@el66/$releasever) python(abi) = 2.6 Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge) Requires: libpython2.7.so.1.0()(64bit) You could try using --skip-broken to work around the problem 

我不知道为什么它试图findel7包? 我在我的机器中有这些库。

 $ rpm -qa | grep rpmfor rpmforge-release-0.5.3-1.el7.rf.x86_64 

首先,您需要安装正确的rpmforge-release软件包。 下载并使用rpm -U --oldpackage将其安装在错误的软件包上。

其次,你需要清理caching的yum元数据。 用yum clean all来摆脱一切。

第三,使用yum distro-sync来降级安装了错误分发的软件包。 (并注意,这也将升级任何过时的软件包。)