done is better than perfect

自分が学んだことや、作成したプログラムの記事を書きます。

CentOS 6.5から7.2にアップデートした時のメモ

色々あって、VPS上で標題のことを行ってみました。すんなりいけるかとおもいきや結構ハマる。まあ自業自得ですが。

  1. CentOS 6.5のアップデート まずは7.2にアップグレードする前に、CentOS 6.5を最新のバージョンにしておきます。
# yum -y update
  1. /etc/yum.repo.d/CentOS-Base.repoを編集 下記を追加
[upg]
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

念のため、上記編集後以下のコマンドを実行

# yum clean all
  1. 必要なものをインストール
# yum install -y openscap pcre-devel libxml2-devel libxslt-devel m2crypto python-simplejson mod_wsgi redhat-upgrade-tool preupgrade-assistant-contents
  1. アップグレード前のチェック
# preupg --list
# preupg -s CentOS6_7
  1. rpmのkeyを追加
# rpm --import http://ftp.plusline.de/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
  1. アップグレード
# redhat-upgrade-tool-cli --network 7.0 --instrepo http://mirror.centos.org/centos/7/os/x86_64/ --force

上記までの手順で無事CentOS 7.2にすることができました。7.0だと思ってたけど一気に7.2まで。

で、アップグレード後におもむろにyum -y updateすると・・・

...
Error: Package: python-pillow-2.0.0-19.gitd1c6db8.el7.x86_64 (installed)
           Requires: libwebp.so.4()(64bit)
           Removing: libwebp-0.3.0-3.el7.x86_64 (installed)
               libwebp.so.4()(64bit)
           Updated By: libwebp-0.4.3-3.el6.x86_64 (epel)
              ~libwebp.so.5()(64bit)
 You could try using --skip-broken to work around the problem
** Found 26 pre-existing rpmdb problem(s), 'yum check' output follows:
10:centos-release-SCL-6-5.el6.centos.x86_64 has missing requires of centos-release = ('0', '6', None)
10:centos-release-cr-6-0.el6.centos.x86_64 has missing requires of centos-release = ('0', '6', None)
cloog-ppl-0.15.7-1.2.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
grep-2.20-3.el6_7.1.x86_64 has missing requires of libpcre.so.0()(64bit)
libgcj-4.4.7-16.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
mosh-1.2.4-1.el6.x86_64 has missing requires of libprotobuf.so.6()(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-boto-2.38.0-1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-cheetah-2.4.1-1.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
python-cheetah-2.4.1-1.el6.x86_64 has missing requires of python(abi) = ('0', '2.6', None)
python-iwlib-0.1-1.2.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
python-iwlib-0.1-1.2.el6.x86_64 has missing requires of python(abi) = ('0', '2.6', None)
python-jsonpatch-1.2-2.el6.centos.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-markdown-2.0.1-3.1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-ordereddict-1.1-2.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-prettytable-0.7.2-1.el6.centos.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-requests-2.6.0-3.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-rsa-3.1.1-5.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
python-simplejson-2.0.9-3.1.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
python-simplejson-2.0.9-3.1.el6.x86_64 has missing requires of python(abi) = ('0', '2.6', None)
1:readahead-1.5.6-2.el6.x86_64 has missing requires of upstart
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)
satyr-0.16-2.el6.x86_64 has missing requires of librpm.so.1()(64bit)
2:vim-enhanced-7.4.629-5.el6.x86_64 has missing requires of perl(:MODULE_COMPAT_5.10.1)

オーノー・・・

問題は、epel-releaseが古いままであったことにありました。以下のように、CentOS7で改めてepel-releaseをインストールしましょう。

# yum -y install epel-release

参考URL