遠端升級雲伺服器系統 CentOS 6.x 至 CentOS 7.x
由於docker-ce不再支援centos6,所以覺得吧系統升級為centos7,以下是踩坑的過程
1、新增源 /etc/yum.repos.d/upgrade.repo
[upgrade]
name=CentOS-$releasever - Upgrade Tool
baseurl=http://dev.centos.org/centos/6/upg/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
2、使用 yum 安裝此工具及其預升級助手
[root@allen05ren ~]# yum install redhat-upgrade-tool preupgrade-assistant-contents
3、執行此工具的預升級助手檢視可用內容
[root@allen05ren ~]# preupg -l
CentOS6_7
4、執行預升級助手進行升級前的檢查
[root@ibills ~]# preupg -s CentOS6_7
問題來了:
I/O warning : failed to load external entity "/usr/share/openscap/xsl/security-guide.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 40 element import
xsl:import : unable to load /usr/share/openscap/xsl/security-guide.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/oval-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 41 element import
xsl:import : unable to load /usr/share/openscap/xsl/oval-report.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/sce-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 42 element import
xsl:import : unable to load /usr/share/openscap/xsl/sce-report.xsl
OpenSCAP Error:: Could not parse XSLT file '/usr/share/preupgrade/xsl/preup.xsl' [oscapxml.c:416]
Unable to open file /root/preupgrade/result.html
Usage: preupg [options]
preupg: error: [Errno 2] No such file or directory: '/root/preupgrade/result.html'
遇到問題那麼就找原因和解決方法,通過搜尋引擎搜尋,找到 CentOS 官方論壇的一篇帖子,帖子中有一回復如下:
Erase the existing version of openscap (I had openscap 1.2) and install openscap-1.0.8-1.0.1 from http://dev.centos.org/centos/6/upg and redo the upgrade.
根據他的方法,把 openscap 軟體包的版本降低之後,重新再安裝此工具及其預升級助手:
[root@allen05ren ~]# yum erase openscap
[root@allen05ren ~]# yum install http://dev.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm
[root@allen05ren ~]# yum install redhat-upgrade-tool preupgrade-assistant-contents
重新執行 preupg -s CentOS6_7 命令:
[[email protected] ~]# preupg -s CentOS6_7
Preupg tool doesn't do the actual upgrade.
Please ensure you have backed up your system and/or data in the event of a failed upgrade
that would require a full re-install of the system from installation media.
Do you want to continue? y/n
y
Gathering logs used by preupgrade assistant:
All installed packages : 01/10 ...finished (time 00:00s)
All changed files : 02/10 ...finished (time 00:48s)
Changed config files : 03/10 ...finished (time 00:00s)
All users : 04/10 ...finished (time 00:00s)
...
042/100 ...done (samba shared directories selinux)
043/100 ...done (CUPS Browsing/BrowsePoll configuration)
044/100 ...done (CVS Package Split)
...
|samba shared directories selinux |notapplicable |
|CUPS Browsing/BrowsePoll configuration |notapplicable |
|CVS Package Split |notapplicable |
...
檢查需要一些時間,檢查的結果會被儲存到 /root/preupgrade/result.html,預升級助手的目的可以檢視上面給出的此工具的用途說明。/root/preupgrade 目錄下還儲存了其他一些檔案,在升級完成後,可以檢視一下。
5、開始執行升級
首先匯入 CentOS 7 的CentOS-7 RPM GPG KEY:
[root@allen05ren ~]# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
執行升級命令:
[[email protected] ~]# centos-upgrade-tool-cli --network 7 --instrepo=http://mirror.centos.org/centos/7/os/x86_64/
以上的包倉庫也可更換為其他的源地址。
問題又來了:
…
Continue with the upgrade [Y/N]? y
getting boot images…
Downloading failed: invalid data in .treeinfo: No option ‘upgrade’ in section: ‘images-x86_64’
根據提示,.treeinfo 檔案中的 ‘images-x86_64’ 部分沒有 ‘upgrade’ 選項,檢視該檔案:
[general]
name = CentOS Linux-7
family = CentOS Linux
timestamp = 1480944027.47
variant =
version = 7
packagedir =
arch = x86_64
[stage2]
mainimage = LiveOS/squashfs.img
[images-x86_64]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
boot.iso = images/boot.iso
[images-xen]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
[checksums]
LiveOS/squashfs.img = sha256:bb4bc180bce57d78e5ea0df91410a006b08966663ef21ff746b4b102852d08bb
repodata/repomd.xml = sha256:27dc6846e9cb739a79b28acdad499c7cc1894781bd92e0adedc646b05cf95d77
images/pxeboot/vmlinuz = sha256:0e9b8a60576744d54c2468fbc84051e09a6090d1b1cfecf9adbdd95b3614a8a2
images/pxeboot/initrd.img = sha256:d012bf47580c63586f02e8247819ea28bd6edc5e3870f13b1efd0130d4593cae
images/efiboot.img = sha256:c43aa456d5de63ffafe9792584aecc167f6de723fdc5ac78b0309f88788c5915
images/boot.iso = sha256:f2f7367deb90a25822947660c71638333ca0eceeabecc2d631be6cd508c24494
確實無此選項,但是根據官方的升級步驟也完全沒有錯誤,經過一頓折騰,找其他的源,發現都是沒有此選項(其實後面傳送找其他源也是徒勞,因為都是同步的官方源的)。
心想不太可能升級不了,靈機一動 CentOS 不是有舊系統的備份源嗎:http://vault.centos.org/,上去就是幾個現存的 CentOS 版本目錄檢視 .treeinfo 檔案,皇天不負有心人,7.0.1406、7.1.1503、7.2.1511幾個版本都有 ‘upgrade’ 選項,那就選個最新的 7.2.1511 版本,升級完再升級吧:
[general]
name = CentOS-7
family = CentOS
timestamp = 1449700442.21
variant =
version = 7
packagedir =
arch = x86_64
[stage2]
mainimage = LiveOS/squashfs.img
[images-x86_64]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
upgrade = images/pxeboot/upgrade.img
boot.iso = images/boot.iso
[images-xen]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
upgrade = images/pxeboot/upgrade.img
[checksums]
LiveOS/squashfs.img = sha256:1778a13e6a0bd98c0db94c4c068e08f84f6f91cdca7b2a5111aad1b5a181c0c4
repodata/repomd.xml = sha256:13d1072eeb97c6e5a0ab8bcbf5f8b0b82c87c43bf6e4be26983772609b237cb1
images/pxeboot/vmlinuz = sha256:ee2df000e29c79ae96db95f61766a8c5adc527d8c92c4114badedf251f73b20e
images/pxeboot/upgrade.img = sha256:fa54ce9a3aedad9d7de59507410af3eec51ac7e65b45b7ac9a14c971f33e45cf
images/pxeboot/initrd.img = sha256:ad1f8fc2bebe9ec1eb5c36d4c38177e39fe8423602098d60c29804081f81b8bd
images/efiboot.img = sha256:08743dd12b338a6c726dd0d66e2109e18e19db8b6f0191f9882929035e7875a6
images/boot.iso = sha256:9ed9ffb5d89ab8cca834afce354daa70a21dcb410f58287d6316259ff89758f5
把源倉庫地址一換,終於順利下載升級檔案開始升級。
[[email protected] ~]# centos-upgrade-tool-cli --network 7 --instrepo=http://vault.centos.org/centos/7.2.1511/os/x86_64/
setting up repos...
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
cmdline-instrepo | 3.6 kB 00:00
cmdline-instrepo/primary_db | 5.3 MB 02:17
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:05
upg | 1.9 kB 00:00
upg/primary_db | 14 kB 00:00
No upgrade available for the following repos: base extras updates
.treeinfo | 1.1 kB 00:00
Preupgrade assistant risk check found risks for this upgrade.
You can run preupg --riskcheck --verbose to view these risks.
Addressing high risk issues is required before the in-place upgrade
and ignoring these risks may result in a broken upgrade and unsupported upgrade.
Please backup your data.
List of issues:
INPLACERISK: HIGH: We detected some non-CentOS signed packages, you can find the list in /root/preupgrade/./kickstart/noncentospkgs. You need to handle them yourself!
INPLACERISK: HIGH: After upgrading to CentOS 7 there are still some el6 packages left. Add --cleanup-post option to redhat-upgrade-tool if you want to remove them automatically.
INPLACERISK: HIGH: Library pcre (required by NonCentOS signed package(s):nginx ) changed soname between CentOS 6 and CentOS 7
INPLACERISK: HIGH: The service network on CentOS 7 is disabled by default. Enable them via commands: systemctl enable network && systemctl start network.service .
INPLACERISK: HIGH: The service nscd on CentOS 7 is disabled by default. Enable them via commands: systemctl enable nscd && systemctl start nscd.service .
INPLACERISK: HIGH: The service ntpd on CentOS 7 is disabled by default. Enable them via commands: systemctl enable ntpd && systemctl start ntpd.service .
INPLACERISK: HIGH: The service udev-post on CentOS 7 is disabled by default. Enable them via commands: systemctl enable udev-post && systemctl start udev-post.service .
INPLACERISK: HIGH: File /etc/rc.d/rc.local was changed
INPLACERISK: MEDIUM: We detected some packages installed on the system were removed (obsoleted) between CentOS 6 and CentOS 7. This may break the functionality of the packages depending on them.
INPLACERISK: MEDIUM: We detected some packages installed on the system were removed between CentOS 6 and CentOS 7. This may break the functionality of the packages depending on them.
INPLACERISK: MEDIUM: Package ql2500-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql23xx-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package bfa-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql2100-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package rt61pci-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package coreutils-libs not provided by its replacement coreutils. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql2400-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package rt73usb-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql2200-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: having one of [nss libxcb libdrm libibverbs systemtap libpciaccess nss-sysinit ca-certificates systemtap-devel libX11 tzdata nspr nss-util elfutils-libelf systemtap-runtime openldap systemtap-client audit libX11-common audit-libs elfutils-libs nss-tools librdmacm openscap] package installed breaks upgrade
INPLACERISK: MEDIUM: We detected some soname bumps in the libraries installed on the system. This may break the functionality of some of your 3rd party applications. They may need rebuild. Please check their requirements.
INPLACERISK: MEDIUM: We detected some .so libraries installed on the system were removed between CentOS 6 and CentOS 7. This may break the functionality of some of your 3rd party applications.
INPLACERISK: MEDIUM: The service supervisord is not installed by CentOS signed packages and will not be automatically enabled after in-place upgrade.
INPLACERISK: SLIGHT: We detected some files where modifications are not tracked in the rpms. You may need to check their functionality after successful upgrade.
INPLACERISK: SLIGHT: We detected some files untracked by rpms. Some of these may need manual check/migration after redhat-upgrade-tool and/or can cause conflicts or troubles during the installation. Try to reduce unnecessary untracked files before running redhat-upgrade-tool.
INPLACERISK: SLIGHT: Package procps (required by NonCentOS signed package(s):mysql-community-server ) replaced between CentOS 6 and CentOS 7
INPLACERISK: SLIGHT: We detected some packages installed on the system changed their name between CentOS 6 and CentOS 7. Although they should be compatible, monitoring after the update is recommended.
INPLACERISK: SLIGHT: export shell commands will be deleted from /etc/sysconfig/sshd
INPLACERISK: SLIGHT: Some binaries untracked by RPM were discovered on the system and may need rebuild after upgrade.
INPLACERISK: SLIGHT: Some scripts untracked by RPM were discovered on the system and may not work properly after upgrade.
INPLACERISK: SLIGHT: The perl module /usr/lib64/perl5/vendor_perl/nginx.pm was not installed by any CentOS-signed package.
INPLACERISK: SLIGHT: The perl module /usr/lib64/perl5/vendor_perl/nginx.pm was not installed by any CentOS-signed package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/meld3 is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/meld3-1.0.2.dist-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/pip is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/pip-9.0.1-py2.6.egg is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/pip-9.0.1.dist-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/pkg_resources is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/setuptools-28.8.0.dist-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/supervisor is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/supervisor-3.3.1-py2.6.egg is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/supervisor-3.3.1-py2.6.egg-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python3.4/site-packages/__pycache__ is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/meld3 is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib64/python3.4/site-packages/__pycache__ is owned by an RPM package that was not signed by CentOS.
Continue with the upgrade [Y/N]? y
getting boot images...
vmlinuz-redhat-upgrade-tool | 4.9 MB 02:30
initramfs-redhat-upgrade-tool.img | 42 MB 00:14
setting up update...
finding updates 18% [=============================== ]cmdline-instrepo/filelists_db | 6.2 MB 00:06
finding updates 64% [=========================================================================================================== ]epel/filelists_db | 7.8 MB 00:07
finding updates 100% [=======================================================================================================================================================================](1/360): acl-2.2.51-12.el7.x86_64.rpm | 81 kB 00:01
(2/360): aic94xx-firmware-30-6.el7.noarch.rpm | 23 kB 00:00
(3/360): apr-1.4.8-3.el7.x86_64.rpm | 103 kB 00:02
(4/360): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:02
(5/360): apr-util-ldap-1.5.2-6.el7.x86_64.rpm | 19 kB 00:00
(6/360): attr-2.4.46-12.el7.x86_64.rpm | 66 kB 00:00
(7/360): authconfig-6.2.8-10.el7.x86_64.rpm | 402 kB 00:05
(8/360): autoconf-2.69-11.el7.noarch.rpm | 701 kB 00:19
(9/360): autogen-libopts-5.18-5.el7.x86_64.rpm | 66 kB 00:01
...
(358/360): zip-3.0-10.el7.x86_64.rpm | 260 kB 00:01
(359/360): zlib-1.2.7-15.el7.x86_64.rpm | 89 kB 00:01
(360/360): zlib-devel-1.2.7-15.el7.x86_64.rpm | 50 kB 00:00
testing upgrade transaction
rpm transaction 100% [=======================================================================================================================================================================]
rpm install 100% [===========================================================================================================================================================================]
setting up system for upgrade
Finished. Reboot to start upgrade.
[[email protected] ~]# reboot
注意執行該命令會列舉出一些升級的問題,讓你確認是否升級,請注意檢視並儲存列出的這些問題,待升級完成後,根據情況處理這些問題。
mount /dev/cdrom /mnt/cdrom/***.iso
強制升級
redhat-upgrade-tool-cli --device=/dev/cdrom --force
重啟伺服器
reboot
4、以為重啟之後,升級就算完成了。然而,再 ssh 發現登入不上了:
[[email protected] ~]$ ssh [email protected]x.x.x.x
ssh: connect to host x.x.x.x port 22: Connection refused
好吧,不是還可以登入 web 的終端,登入上,看到確實升級到了 CentOS 7 了,檢視 sshd 服務情況,確實服務沒啟動:
[[email protected] ~]# systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since 三 2017-03-15 15:05:33 CST; 24s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1788 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=127)
Main PID: 1696 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/sshd.service
├─1710 sshd: [email protected]/0
├─1712 -bash
└─1789 systemctl status sshd
3月 15 15:05:33 allen05ren systemd[1]: sshd.service: control process exited, code=exited status=127
3月 15 15:05:33 allen05ren systemd[1]: Failed to start OpenSSH server daemon.
3月 15 15:05:33 allen05ren systemd[1]: Unit sshd.service entered failed state.
3月 15 15:05:33 allen05ren systemd[1]: sshd.service failed.
那就啟動一下看看,發現啟動不了,那就重新安裝一下 ssh 服務,發現 yum 用不了:
[[email protected] ~]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libsasl2.so.2: cannot open shared object file: No such file or directory
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
不行就重新安裝一下 yum 看看,看看 rpm 安裝了什麼版本的 yum,好吧 rpm 也用不了:
[[email protected] ~]# rpm -qa|grep yum
grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
搜尋引擎搜尋,發現只要做個軟連線就可以了:
[root@allen05ren ~]# ls -l /usr/lib64/libsasl2.so*
lrwxrwxrwx 1 root root 17 3月 15 14:14 /usr/lib64/libsasl2.so -> libsasl2.so.3.0.0
lrwxrwxrwx 1 root root 17 3月 15 14:12 /usr/lib64/libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121296 11月 21 2015 /usr/lib64/libsasl2.so.3.0.0
[root@allen05ren ~]# ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2
[root@ibills ~]# yum
Loaded plugins: fastestmirror
You need to give some command
Usage: yum [options] COMMAND
List of Commands:
check Check for problems in the rpmdb
check-update Check for available package updates
clean Remove cached data
deplist List a package's dependencies
libpcre.so.0 也軟連線一下,都恢復正常了:
[[email protected] ~]# ls -l /usr/lib64/libpcre.so*
lrwxrwxrwx 1 root root 16 3月 15 14:13 /usr/lib64/libpcre.so -> libpcre.so.1.2.0
lrwxrwxrwx 1 root root 16 3月 15 14:12 /usr/lib64/libpcre.so.1 -> libpcre.so.1.2.0
-rwxr-xr-x 1 root root 398272 11月 20 2015 /usr/lib64/libpcre.so.1.2.0
[[email protected] ~]# ln -s /usr/lib64/libpcre.so.1.2.0 /usr/lib64/libpcre.so.0
[[email protected] ~]# rpm -qa|grep yum
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-plugin-fastestmirror-1.1.31-34.el7.noarch
yum-3.4.3-132.el7.centos.0.1.noarch
發現再啟動 ssh 服務也可以正常啟動了,可以愉快地連線了。
整個升級過程差不多就告一段落了,再繼續升級或做一些收尾的工作,比如上面升級時提示存在的哪些問題,然後再執行:
#檢視殘留的 CentOS 6.x 的檔案包
rpm -qa | grep -i el6
檢視一下殘留的 CentOS 6.x 的檔案包,不用的就解除安裝或解除安裝後重新安裝 CentOS 7.x 的版本,這裡就又遇到一個問題:grep 包還是 CentOS 6.x 的版本(雖然不影響使用)且版本號比當前 CentOS 7.x 的版本的版本還高,並且有大量其他包依賴此包,這時候就可以使用 yum 的軟體包降版本命令:
yum downgrade grep
yum update 更新過程中報錯
Finished Dependency Resolution
Error: Package: nettle-3.2-2.el6.x86_64 (epel)
Requires: libgmp.so.3()(64bit)
Error: Package: gnutls-3.3.26-9.el7.x86_64 (base)
Requires: libnettle.so.4()(64bit)
Removing: nettle-2.7.1-4.el7.x86_64 (installed)
libnettle.so.4()(64bit)
Updated By: nettle-3.2-2.el6.x86_64 (epel)
~libnettle.so.6()(64bit)
Available: nettle-2.7.1-8.el7.x86_64 (base)
libnettle.so.4()(64bit)
Error: Package: gnutls-3.3.26-9.el7.x86_64 (base)
Requires: libhogweed.so.2()(64bit)
Removing: nettle-2.7.1-4.el7.x86_64 (installed)
libhogweed.so.2()(64bit)
Updated By: nettle-3.2-2.el6.x86_64 (epel)
~libhogweed.so.4()(64bit)
Available: nettle-2.7.1-8.el7.x86_64 (base)
libhogweed.so.2()(64bit)
You could try using --skip-broken to work around the problem
** Found 28 pre-existing rpmdb problem(s), 'yum check' output follows:
cloog-ppl-0.15.7-1.2.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
elfutils-libs-0.163-3.el7.x86_64 has missing requires of elfutils-libelf(x86-64) = ('0', '0.163', '3.el7')
libgcj-4.4.7-18.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
libkadm5-1.10.3-65.el6.x86_64 has missing requires of krb5-libs(x86-64) = ('0', '1.10.3', '65.el6')
libkadm5-1.10.3-65.el6.x86_64 has missing requires of libkdb5.so.6()(64bit)
libkadm5-1.10.3-65.el6.x86_64 has missing requires of libkdb5.so.6(kdb5_6_MIT)(64bit)
ppl-0.10.2-11.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
python-argparse-1.2.1-2.1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-backports-ssl_match_hostname-3.4.0.2-5.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-crypto-2.6.1-2.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
python-crypto-2.6.1-2.el6.x86_64 has missing requires of python(abi) = ('0', '2.6', None)
python-futures-3.0.3-1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-jinja2-2.7.3-1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-msgpack-0.4.6-1.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
python-msgpack-0.4.6-1.el6.x86_64 has missing requires of python(abi) = ('0', '2.6', None)
python-requests-2.6.0-4.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-requests-2.6.0-4.el6.noarch has missing requires of python-ordereddict >= ('0', '1.1', None)
python-tornado-4.2.1-1.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
python-tornado-4.2.1-1.el6.x86_64 has missing requires of python(abi) = ('0', '2.6', None)
python-urllib3-1.10.2-3.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-urllib3-1.10.2-3.el6.noarch has missing requires of python-ordereddict
python-zmq-14.5.0-2.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
python-zmq-14.5.0-2.el6.x86_64 has missing requires of python(abi) = ('0', '2.6', None)
1:redhat-upgrade-tool-0.7.22-3.el6.centos.noarch has missing requires of preupgrade-assistant >= ('0', '1.0.2', '4')
1:redhat-upgrade-tool-0.7.22-3.el6.centos.noarch has missing requires of python(abi) = ('0', '2.6', None)
salt-2016.3.4-1.el6.noarch has missing requires of /usr/bin/python2.6
salt-2016.3.4-1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
salt-minion-2016.3.4-1.el6.noarch has missing requires of /usr/bin/python2.6
這是由於EPEL版本不對導致的,依次執行下面的命令就好了
yum remove epel-release
yum --enablerepo=extras install epel-release
yum clean all
執行完上面的命令後有可能還會報下面的錯
** Found 28 pre-existing rpmdb problem(s), 'yum check' output follows:
cloog-ppl-0.15.7-1.2.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
elfutils-libs-0.163-3.el7.x86_64 has missing requires of elfutils-libelf(x86-64) = ('0', <