我在升级 RedHat 7.2 时遇到问题
$ sudo yum clean all
$ sudo yum install -y $(cat redhat_packages.txt)
结果:
Failed to set locale, defaulting to C
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Package tree-1.6.0-10.el7.x86_64 already installed and latest version
Package gcc-4.8.5-4.el7.x86_64 already installed and latest version
No package curl-7.35* available.
Package dstat-0.7.2-12.el7.noarch already installed and latest version
Package iotop-0.6-2.el7.noarch already installed and latest version
Package swig-2.0.10-4.el7.x86_64 already installed and latest version
Package libffi-devel-3.0.13-16.el7.x86_64 already installed and latest version
Package libxml2-devel-2.9.1-6.el7_2.3.x86_64 already installed and latest version
Package libxslt-devel-1.1.28-5.el7.x86_64 already installed and latest version
Package ncurses-devel-5.9-13.20130511.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.5 will be updated
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.7 will be an update
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.7 for package: 1:openssl-devel-1.0.1e-51.el7_2.7.x86_64
---> Package python.x86_64 0:2.7.5-34.el7 will be updated
---> Package python.x86_64 0:2.7.5-39.el7_2 will be an update
--> Processing Dependency: python-libs(x86-64) = 2.7.5-39.el7_2 for package: python-2.7.5-39.el7_2.x86_64
---> Package python-devel.x86_64 0:2.7.5-34.el7 will be updated
---> Package python-devel.x86_64 0:2.7.5-39.el7_2 will be an update
--> Running transaction check
---> Package openssl-libs.x86_64 1:1.0.1e-34.el7 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-1.0.1e-34.el7.x86_64
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.5 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5 for package: 1:openssl-1.0.1e-51.el7_2.5.x86_64
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.7 will be an update
---> Package python-libs.x86_64 0:2.7.5-34.el7 will be updated
---> Package python-libs.x86_64 0:2.7.5-39.el7_2 will be an update
--> Running transaction check
---> Package openssl.x86_64 1:1.0.1e-34.el7 will be updated
---> Package openssl.x86_64 1:1.0.1e-51.el7_2.5 will be updated
---> Package openssl.x86_64 1:1.0.1e-51.el7_2.7 will be an update
---> Package openssl-libs.x86_64 1:1.0.1e-34.el7 will be updated
--> Finished Dependency Resolution
Error: Package: 1:openssl-1.0.1e-34.el7.x86_64 (@anaconda/7.0)
Requires: openssl-libs(x86-64) = 1:1.0.1e-34.el7
Removing: 1:openssl-libs-1.0.1e-34.el7.x86_64 (@anaconda/7.0)
openssl-libs(x86-64) = 1:1.0.1e-34.el7
Updated By: 1:openssl-libs-1.0.1e-51.el7_2.7.x86_64 (updates)
openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.7
Removing: 1:openssl-libs-1.0.1e-51.el7_2.5.x86_64 (installed)
openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5
Updated By: 1:openssl-libs-1.0.1e-51.el7_2.7.x86_64 (updates)
openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.7
Available: 1:openssl-libs-1.0.1e-34.el7_0.3.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.3
Available: 1:openssl-libs-1.0.1e-34.el7_0.4.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.4
Available: 1:openssl-libs-1.0.1e-34.el7_0.6.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.6
Available: 1:openssl-libs-1.0.1e-34.el7_0.7.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.7
Available: 1:openssl-libs-1.0.1e-42.el7.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-42.el7
Available: 1:openssl-libs-1.0.1e-42.el7_1.4.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4
Available: 1:openssl-libs-1.0.1e-42.el7_1.5.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.5
Available: 1:openssl-libs-1.0.1e-42.el7_1.6.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.6
Available: 1:openssl-libs-1.0.1e-42.el7_1.8.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.8
Available: 1:openssl-libs-1.0.1e-42.el7_1.9.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.9
Available: 1:openssl-libs-1.0.1e-42.el7.9.x86_64 (base)
openssl-libs(x86-64) = 1:1.0.1e-42.el7.9
Available: 1:openssl-libs-1.0.1e-51.el7_2.1.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.1
Available: 1:openssl-libs-1.0.1e-51.el7_2.2.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.2
Available: 1:openssl-libs-1.0.1e-51.el7_2.4.x86_64 (rhel-7-repo)
openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.4
You could try using --skip-broken to work around the problem
** Found 19 pre-existing rpmdb problem(s), 'yum check' output follows:
curl-7.29.0-25.el7.centos.x86_64 is a duplicate with curl-7.29.0-19.el7.x86_64
e2fsprogs-1.42.9-7.el7.x86_64 is a duplicate with e2fsprogs-1.42.9-4.el7.x86_64
e2fsprogs-libs-1.42.9-7.el7.x86_64 is a duplicate with e2fsprogs-libs-1.42.9-4.el7.x86_64
epel-release-7-7.noarch is a duplicate with epel-release-7-5.noarch
krb5-libs-1.13.2-12.el7_2.x86_64 is a duplicate with krb5-libs-1.11.3-49.el7.x86_64
libcom_err-1.42.9-7.el7.x86_64 is a duplicate with libcom_err-1.42.9-4.el7.x86_64
libcurl-7.29.0-25.el7.centos.x86_64 is a duplicate with libcurl-7.29.0-19.el7.x86_64
libffi-3.0.13-16.el7.x86_64 is a duplicate with libffi-3.0.13-11.el7.x86_64
libgcrypt-1.5.3-12.el7_1.1.x86_64 is a duplicate with libgcrypt-1.5.3-4.el7.x86_64
libss-1.42.9-7.el7.x86_64 is a duplicate with libss-1.42.9-4.el7.x86_64
libxml2-2.9.1-6.el7_2.3.x86_64 is a duplicate with libxml2-2.9.1-5.el7.x86_64
libxml2-python-2.9.1-6.el7_2.3.x86_64 is a duplicate with libxml2-python-2.9.1-5.el7.x86_64
1:openssl-1.0.1e-51.el7_2.5.x86_64 is a duplicate with 1:openssl-1.0.1e-34.el7.x86_64
1:openssl-libs-1.0.1e-51.el7_2.5.x86_64 is a duplicate with 1:openssl-libs-1.0.1e-34.el7.x86_64
pcre-8.32-15.el7_2.1.x86_64 is a duplicate with pcre-8.32-12.el7.x86_64
wget-1.14-10.el7_0.1.x86_64 is a duplicate with wget-1.14-10.el7.x86_64
xz-5.1.2-12alpha.el7.x86_64 is a duplicate with xz-5.1.2-8alpha.el7.x86_64
xz-libs-5.1.2-12alpha.el7.x86_64 is a duplicate with xz-libs-5.1.2-8alpha.el7.x86_64
zlib-1.2.7-15.el7.x86_64 is a duplicate with zlib-1.2.7-13.el7.x86_64
运行时:
$ sudo yum install -y $(cat redhat_packages.txt) --skip-broken
没有得到任何更好的结果:
Failed to set locale, defaulting to C
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Package tree-1.6.0-10.el7.x86_64 already installed and latest version
Package gcc-4.8.5-4.el7.x86_64 already installed and latest version
No package curl-7.35* available.
Package dstat-0.7.2-12.el7.noarch already installed and latest version
Package iotop-0.6-2.el7.noarch already installed and latest version
Package swig-2.0.10-4.el7.x86_64 already installed and latest version
Package libffi-devel-3.0.13-16.el7.x86_64 already installed and latest version
Package libxml2-devel-2.9.1-6.el7_2.3.x86_64 already installed and latest version
Package libxslt-devel-1.1.28-5.el7.x86_64 already installed and latest version
Package ncurses-devel-5.9-13.20130511.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.5 will be updated
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.7 will be an update
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.7 for package: 1:openssl-devel-1.0.1e-51.el7_2.7.x86_64
---> Package python.x86_64 0:2.7.5-34.el7 will be updated
---> Package python.x86_64 0:2.7.5-39.el7_2 will be an update
--> Processing Dependency: python-libs(x86-64) = 2.7.5-39.el7_2 for package: python-2.7.5-39.el7_2.x86_64
---> Package python-devel.x86_64 0:2.7.5-34.el7 will be updated
---> Package python-devel.x86_64 0:2.7.5-39.el7_2 will be an update
--> Running transaction check
---> Package openssl-libs.x86_64 1:1.0.1e-34.el7 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-1.0.1e-34.el7.x86_64
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.5 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5 for package: 1:openssl-1.0.1e-51.el7_2.5.x86_64
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.7 will be an update
---> Package python-libs.x86_64 0:2.7.5-34.el7 will be updated
---> Package python-libs.x86_64 0:2.7.5-39.el7_2 will be an update
--> Running transaction check
---> Package openssl.x86_64 1:1.0.1e-34.el7 will be updated
---> Package openssl.x86_64 1:1.0.1e-51.el7_2.5 will be updated
---> Package openssl.x86_64 1:1.0.1e-51.el7_2.7 will be an update
---> Package openssl-libs.x86_64 1:1.0.1e-34.el7 will be updated
--> Running transaction check
---> Package openssl.x86_64 1:1.0.1e-34.el7 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-1.0.1e-34.el7.x86_64
---> Package openssl.x86_64 1:1.0.1e-51.el7_2.7 will be an update
--> Running transaction check
---> Package openssl.x86_64 1:1.0.1e-34.el7 will be updated
---> Package openssl-libs.x86_64 1:1.0.1e-34.el7 will be updated
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.7 will be an update
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.7 for package: 1:openssl-devel-1.0.1e-51.el7_2.7.x86_64
--> Running transaction check
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.5 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5 for package: 1:openssl-devel-1.0.1e-51.el7_2.5.x86_64
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.7 will be an update
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.7 will be an update
--> Running transaction check
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.5 will be updated
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.5 will be updated
--> Running transaction check
---> Package python.x86_64 0:2.7.5-34.el7 will be updated
---> Package python.x86_64 0:2.7.5-39.el7_2 will be an update
---> Package python-devel.x86_64 0:2.7.5-34.el7 will be updated
---> Package python-devel.x86_64 0:2.7.5-39.el7_2 will be an update
---> Package python-libs.x86_64 0:2.7.5-34.el7 will be updated
---> Package python-libs.x86_64 0:2.7.5-39.el7_2 will be an update
--> Finished Dependency Resolution
Packages skipped because of dependency problems:
1:openssl-1.0.1e-51.el7_2.7.x86_64 from updates
1:openssl-devel-1.0.1e-51.el7_2.7.x86_64 from updates
1:openssl-libs-1.0.1e-51.el7_2.7.x86_64 from updates
Dependencies Resolved
================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================
Updating:
python x86_64 2.7.5-39.el7_2 updates 89 k
python-devel x86_64 2.7.5-39.el7_2 updates 392 k
Updating for dependencies:
python-libs x86_64 2.7.5-39.el7_2 updates 5.6 M
Skipped (dependency problems):
openssl x86_64 1:1.0.1e-51.el7_2.7 updates 712 k
openssl-devel x86_64 1:1.0.1e-51.el7_2.7 updates 1.2 M
openssl-libs x86_64 1:1.0.1e-51.el7_2.7 updates 953 k
Transaction Summary
================================================================================================================================================================================================
Upgrade 2 Packages (+1 Dependent package)
Skipped (dependency problems) 3 Packages
Total download size: 6.1 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/3): python-2.7.5-39.el7_2.x86_64.rpm | 89 kB 00:00:00
(2/3): python-devel-2.7.5-39.el7_2.x86_64.rpm | 392 kB 00:00:00
(3/3): python-libs-2.7.5-39.el7_2.x86_64.rpm | 5.6 MB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 7.9 MB/s | 6.1 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 19 pre-existing rpmdb problem(s), 'yum check' output follows:
curl-7.29.0-25.el7.centos.x86_64 is a duplicate with curl-7.29.0-19.el7.x86_64
e2fsprogs-1.42.9-7.el7.x86_64 is a duplicate with e2fsprogs-1.42.9-4.el7.x86_64
e2fsprogs-libs-1.42.9-7.el7.x86_64 is a duplicate with e2fsprogs-libs-1.42.9-4.el7.x86_64
epel-release-7-7.noarch is a duplicate with epel-release-7-5.noarch
krb5-libs-1.13.2-12.el7_2.x86_64 is a duplicate with krb5-libs-1.11.3-49.el7.x86_64
libcom_err-1.42.9-7.el7.x86_64 is a duplicate with libcom_err-1.42.9-4.el7.x86_64
libcurl-7.29.0-25.el7.centos.x86_64 is a duplicate with libcurl-7.29.0-19.el7.x86_64
libffi-3.0.13-16.el7.x86_64 is a duplicate with libffi-3.0.13-11.el7.x86_64
libgcrypt-1.5.3-12.el7_1.1.x86_64 is a duplicate with libgcrypt-1.5.3-4.el7.x86_64
libss-1.42.9-7.el7.x86_64 is a duplicate with libss-1.42.9-4.el7.x86_64
libxml2-2.9.1-6.el7_2.3.x86_64 is a duplicate with libxml2-2.9.1-5.el7.x86_64
libxml2-python-2.9.1-6.el7_2.3.x86_64 is a duplicate with libxml2-python-2.9.1-5.el7.x86_64
1:openssl-1.0.1e-51.el7_2.5.x86_64 is a duplicate with 1:openssl-1.0.1e-34.el7.x86_64
1:openssl-libs-1.0.1e-51.el7_2.5.x86_64 is a duplicate with 1:openssl-libs-1.0.1e-34.el7.x86_64
pcre-8.32-15.el7_2.1.x86_64 is a duplicate with pcre-8.32-12.el7.x86_64
wget-1.14-10.el7_0.1.x86_64 is a duplicate with wget-1.14-10.el7.x86_64
xz-5.1.2-12alpha.el7.x86_64 is a duplicate with xz-5.1.2-8alpha.el7.x86_64
xz-libs-5.1.2-12alpha.el7.x86_64 is a duplicate with xz-libs-5.1.2-8alpha.el7.x86_64
zlib-1.2.7-15.el7.x86_64 is a duplicate with zlib-1.2.7-13.el7.x86_64
Updating : python-libs-2.7.5-39.el7_2.x86_64 1/6
Updating : python-2.7.5-39.el7_2.x86_64 2/6
Updating : python-devel-2.7.5-39.el7_2.x86_64 3/6
Cleanup : python-devel-2.7.5-34.el7.x86_64 4/6
Cleanup : python-2.7.5-34.el7.x86_64 5/6
Cleanup : python-libs-2.7.5-34.el7.x86_64 6/6
Verifying : python-devel-2.7.5-39.el7_2.x86_64 1/6
Verifying : python-2.7.5-39.el7_2.x86_64 2/6
Verifying : python-libs-2.7.5-39.el7_2.x86_64 3/6
Verifying : python-devel-2.7.5-34.el7.x86_64 4/6
Verifying : python-libs-2.7.5-34.el7.x86_64 5/6
Verifying : python-2.7.5-34.el7.x86_64 6/6
Updated:
python.x86_64 0:2.7.5-39.el7_2 python-devel.x86_64 0:2.7.5-39.el7_2
Dependency Updated:
python-libs.x86_64 0:2.7.5-39.el7_2
Skipped (dependency problems):
openssl.x86_64 1:1.0.1e-51.el7_2.7 openssl-devel.x86_64 1:1.0.1e-51.el7_2.7 openssl-libs.x86_64 1:1.0.1e-51.el7_2.7
Complete!
有什么想法可以解决这个问题吗?
答案1
就你的情况而言,二独立的 openssl 安装。一个 rpm 来自 RHEL 在线存储库,另一个 rpm 来自“anaconda”存储库(可能是 RHEL 安装 ISO)。我不确定您是如何第二次安装它的,因为默认情况下,一个 openssl 应该使用新的 rpm 进行更新。奇怪的是,您最终安装了两个 rpm。
一个明显的解决方案是使用yum remove
来自 anaconda 的 openssl 的所有 rpm(例如yum remove openssl-libs-1.0.1e-34.el7.x86_64
)。但像往常一样,请先在您的环境中进行测试。