无法使用 yum 安装或更新

无法使用 yum 安装或更新

当尝试在 yum 中安装或更新任何内容时,我得到了需要、删除和废弃的列表:

Loaded plugins: downloadonly, fastestmirror
Setting up Update Process
Determining fastest mirrors
epel/metalink                                                                                                        |  14 kB     00:00     
 * epel: mirrors.mit.edu
base                                                                                                                 | 3.7 kB     00:00     
base/primary_db                                                                                                      | 4.6 MB     00:00     
epel                                                                                                                 | 4.4 kB     00:00     
epel/primary_db                                                                                                      | 3.9 MB     00:00     
extras                                                                                                               | 3.4 kB     00:00     
extras/primary_db                                                                                                    |  30 kB     00:00     
updates                                                                                                              | 3.4 kB     00:00     
updates/primary_db                                                                                                   | 2.1 MB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package db4.x86_64 0:4.7.25-18.el6_4 will be obsoleted
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-build-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: psa-courier-imap-4.15-cos6.build1200150114.15.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: cyrus-sasl-lib-2.1.23-15.el6_6.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: httpd-tools-2.2.15-39.el6.centos.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: cyrus-sasl-2.1.23-15.el6_6.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: iproute-2.6.32-33.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-libs-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: httpd-2.2.15-39.el6.centos.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: pam-1.1.1-20.el6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: python-libs-2.6.6-52.el6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: subversion-1.6.11-12.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: 4:perl-5.10.1-136.el6_6.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: apr-util-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-python-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: 2:postfix-2.8.17-14042513.x86_64
---> Package db4-cxx.x86_64 0:4.7.25-18.el6_4 will be obsoleted
---> Package db4-devel.x86_64 0:4.7.25-18.el6_4 will be obsoleted
---> Package db4-utils.x86_64 0:4.7.25-18.el6_4 will be obsoleted
---> Package libc-client.x86_64 0:2007e-11.el6 will be updated
---> Package libc-client.x86_64 0:2007f-4.el7.1 will be an update
---> Package libdb4.x86_64 0:4.8.30-13.el7 will be obsoleting
---> Package libdb4-cxx.x86_64 0:4.8.30-13.el7 will be obsoleting
---> Package libdb4-devel.x86_64 0:4.8.30-13.el7 will be obsoleting
---> Package libdb4-utils.x86_64 0:4.8.30-13.el7 will be obsoleting
---> Package libmcrypt.x86_64 0:2.5.8-9.el6 will be updated
---> Package libmcrypt.x86_64 0:2.5.8-13.el7 will be an update
---> Package mod_perl.x86_64 0:2.0.4-11.el6_5 will be updated
---> Package mod_perl.x86_64 0:2.0.8-10.20140624svn1602105.el7 will be an update
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64
--> Processing Dependency: perl(Linux::Pid) for package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64
--> Processing Dependency: libdb-5.3.so()(64bit) for package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64
---> Package perl-BSD-Resource.x86_64 0:1.29.03-3.el6 will be updated
---> Package perl-BSD-Resource.x86_64 0:1.29.07-1.el7 will be an update
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: perl-BSD-Resource-1.29.07-1.el7.x86_64
---> Package php-imap.x86_64 0:5.3.3-40.el6_6 will be updated
---> Package php-imap.x86_64 0:5.4.16-2.el7 will be an update
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-imap-5.4.16-2.el7.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-imap-5.4.16-2.el7.x86_64
---> Package pigz.x86_64 0:2.2.5-1.el6 will be updated
---> Package pigz.x86_64 0:2.3.1-1.el7 will be an update
--> Processing Dependency: libz.so.1(ZLIB_1.2.5.1)(64bit) for package: pigz-2.3.1-1.el7.x86_64
---> Package vconfig.x86_64 0:1.9-8.1.el6 will be updated
---> Package vconfig.x86_64 0:1.9-16.el7 will be an update
---> Package wireless-tools.x86_64 1:29-5.1.1.el6 will be updated
---> Package wireless-tools.x86_64 1:29-13.el7 will be an update
--> Running transaction check
---> Package db4.x86_64 0:4.7.25-18.el6_4 will be obsoleted
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-build-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: psa-courier-imap-4.15-cos6.build1200150114.15.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: cyrus-sasl-lib-2.1.23-15.el6_6.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: httpd-tools-2.2.15-39.el6.centos.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: cyrus-sasl-2.1.23-15.el6_6.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: iproute-2.6.32-33.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-libs-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: httpd-2.2.15-39.el6.centos.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: pam-1.1.1-20.el6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: python-libs-2.6.6-52.el6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: subversion-1.6.11-12.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: 4:perl-5.10.1-136.el6_6.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: apr-util-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-python-4.8.0-38.el6_6.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: 2:postfix-2.8.17-14042513.x86_64
---> Package mod_perl.x86_64 0:2.0.8-10.20140624svn1602105.el7 will be an update
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64
--> Processing Dependency: libdb-5.3.so()(64bit) for package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64
---> Package perl-BSD-Resource.x86_64 0:1.29.07-1.el7 will be an update
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: perl-BSD-Resource-1.29.07-1.el7.x86_64
---> Package perl-Linux-Pid.x86_64 0:0.04-18.el7 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: perl-Linux-Pid-0.04-18.el7.x86_64
---> Package php-imap.x86_64 0:5.4.16-2.el7 will be an update
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-imap-5.4.16-2.el7.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-imap-5.4.16-2.el7.x86_64
---> Package pigz.x86_64 0:2.3.1-1.el7 will be an update
--> Processing Dependency: libz.so.1(ZLIB_1.2.5.1)(64bit) for package: pigz-2.3.1-1.el7.x86_64
--> Processing Conflict: libdb4-4.8.30-13.el7.x86_64 conflicts filesystem < 3
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
Found and removing 0 unneeded dependencies
Error: Package: iproute-2.6.32-33.el6_6.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: httpd-tools-2.2.15-39.el6.centos.x86_64 (@base)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: 2:postfix-2.8.17-14042513.x86_64 (@PSA_12_0_18-dist)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: rpm-build-4.8.0-38.el6_6.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: rpm-libs-4.8.0-38.el6_6.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: php-imap-5.4.16-2.el7.x86_64 (epel)
           Requires: php(zend-abi) = 20100525-64
           Installed: php-common-5.3.3-40.el6_6.x86_64 (@updates)
               php(zend-abi) = 20090626
           Available: php-common-5.3.3-38.el6.x86_64 (base)
               php(zend-abi) = 20090626
Error: Package: 4:perl-5.10.1-136.el6_6.1.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: pigz-2.3.1-1.el7.x86_64 (epel)
           Requires: libz.so.1(ZLIB_1.2.5.1)(64bit)
Error: Package: httpd-2.2.15-39.el6.centos.x86_64 (@base)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: python-libs-2.6.6-52.el6.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: perl-Linux-Pid-0.04-18.el7.x86_64 (epel)
           Requires: perl(:MODULE_COMPAT_5.16.3)
Error: Package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64 (epel)
           Requires: httpd-mmn = 20120211x8664
           Installed: httpd-2.2.15-39.el6.centos.x86_64 (@base)
               httpd-mmn = 20051115
Error: Package: php-imap-5.4.16-2.el7.x86_64 (epel)
           Requires: php(api) = 20100412-64
           Installed: php-common-5.3.3-40.el6_6.x86_64 (@updates)
               php(api) = 20090626
           Available: php-common-5.3.3-38.el6.x86_64 (base)
               php(api) = 20090626
Error: Package: subversion-1.6.11-12.el6_6.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: apr-util-1.3.9-3.el6_0.1.x86_64 (@base)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: libdb4 conflicts with filesystem-2.4.30-3.el6.x86_64
Error: Package: perl-BSD-Resource-1.29.07-1.el7.x86_64 (epel)
           Requires: perl(:MODULE_COMPAT_5.16.3)
Error: Package: pam-1.1.1-20.el6.x86_64 (@base)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: psa-courier-imap-4.15-cos6.build1200150114.15.x86_64 (@PSA_12_0_18-dist)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: cyrus-sasl-lib-2.1.23-15.el6_6.1.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64 (epel)
           Requires: perl(:MODULE_COMPAT_5.16.3)
Error: Package: mod_perl-2.0.8-10.20140624svn1602105.el7.x86_64 (epel)
           Requires: libdb-5.3.so()(64bit)
Error: Package: rpm-python-4.8.0-38.el6_6.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: cyrus-sasl-2.1.23-15.el6_6.1.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
Error: Package: rpm-4.8.0-38.el6_6.x86_64 (@updates)
           Requires: libdb-4.7.so()(64bit)
           Removing: db4-4.7.25-18.el6_4.x86_64 (@base)
               libdb-4.7.so()(64bit)
           Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我该如何修复我的依赖关系以便一切都能正确更新?

答案1

看来您有一台 Centos 6 机器,但已为 Centos 7 配置了 Epel 存储库。这行不通。删除它并安装 Centos 6 Epel 存储库,位置如下:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 

确保您也卸载了从 Centos 7 Epel 存储库添加的所有内容。

那就可以了。

答案2

运行以下命令:

yum remove epel-release 

然后运行:

yum update 

这应该可以解决你的问题。

答案3

确实,我在 Centos 6 机器上错误地使用了 Centos 7 的 Epel 存储库。我尝试了上述解决方案,但它们只成功了一半。以下是最终对我有用的方法。

  1. yum remove epel-release
  2. rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/e/epel-release-6-8.noarch.rpm
  3. yum clean all
  4. yum repolist
  5. yum update -y

相关内容