yum 의존성 패키지 버전 에러

yum으로 패키지를 설치하다 보면 아래와 같이 의존성패키지의 버전 문제로 에러가 발생하는 경우가 있다.
yum install 이나 update를 실행할 때, 의존성이 걸린 패키지를 체크하면서 의존성 패키지들 중, 필요한 버전보다 높은 버전이 설치돼 있는 경우에 발생한다.
아래의 경우는 mysql-devel 패키지를 설치하면서, 의존성이 걸린 krb5-libs 와 mysql-libs 패키지가 필요한 패키지보다 높은 버전이 설치돼 있기 때문이다.

간단히 yum downgrade 명령으로 krb5-libs 와 mysql-libs 버전을 다운그레이드 한 후에, yum install 명령으로 mysql-devel 패키지를 설치하면 된다.
[root@Linux-vm1 cron.d]# yum install mysql-devel
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mysql-devel.x86_64 0:5.1.52-1.el6_0.1 will be installed
–> Processing Dependency: mysql = 5.1.52-1.el6_0.1 for package: mysql-devel-5.1.52-1.el6_0.1.x86_64
–> Processing Dependency: openssl-devel for package: mysql-devel-5.1.52-1.el6_0.1.x86_64
–> Running transaction check
—> Package mysql.x86_64 0:5.1.52-1.el6_0.1 will be installed
–> Processing Dependency: mysql-libs = 5.1.52-1.el6_0.1 for package: mysql-5.1.52-1.el6_0.1.x86_64
—> Package openssl-devel.x86_64 0:1.0.0-20.el6 will be installed
–> Processing Dependency: zlib-devel for package: openssl-devel-1.0.0-20.el6.x86_64
–> Processing Dependency: krb5-devel for package: openssl-devel-1.0.0-20.el6.x86_64
–> Running transaction check
—> Package krb5-devel.x86_64 0:1.9-22.el6 will be installed
–> Processing Dependency: krb5-libs = 1.9-22.el6 for package: krb5-devel-1.9-22.el6.x86_64
–> Processing Dependency: libcom_err-devel for package: krb5-devel-1.9-22.el6.x86_64
–> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.9-22.el6.x86_64
–> Processing Dependency: libselinux-devel for package: krb5-devel-1.9-22.el6.x86_64
—> Package mysql-libs.i686 0:5.1.52-1.el6_0.1 will be installed
–> Processing Dependency: libc.so.6(GLIBC_2.3.4) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libc.so.6(GLIBC_2.1) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libc.so.6(GLIBC_2.1.2) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libc.so.6(GLIBC_2.0) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libssl.so.10 for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libpthread.so.0(GLIBC_2.2) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libpthread.so.0(GLIBC_2.1) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libcrypto.so.10 for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libc.so.6(GLIBC_2.4) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libc.so.6(GLIBC_2.1.3) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libnsl.so.1 for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libm.so.6 for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libc.so.6(GLIBC_2.2) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libz.so.1 for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libc.so.6 for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libpthread.so.0(GLIBC_2.0) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libpthread.so.0 for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libpthread.so.0(GLIBC_2.3.2) for package: mysql-libs-5.1.52-1.el6_0.1.i686
–> Processing Dependency: libcrypt.so.1 for package: mysql-libs-5.1.52-1.el6_0.1.i686
—> Package zlib-devel.x86_64 0:1.2.3-27.el6 will be installed
–> Running transaction check
—> Package glibc.i686 0:2.12-1.47.el6 will be installed
–> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.47.el6.i686
–> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.47.el6.i686
—> Package keyutils-libs-devel.x86_64 0:1.4-3.el6 will be installed
—> Package krb5-libs.i686 0:1.9-22.el6 will be installed
–> Processing Dependency: libcom_err.so.2 for package: krb5-libs-1.9-22.el6.i686
–> Processing Dependency: libkeyutils.so.1(KEYUTILS_0.3) for package: krb5-libs-1.9-22.el6.i686
–> Processing Dependency: libkeyutils.so.1 for package: krb5-libs-1.9-22.el6.i686
–> Processing Dependency: libselinux.so.1 for package: krb5-libs-1.9-22.el6.i686
—> Package libcom_err-devel.x86_64 0:1.41.12-11.el6 will be installed
—> Package libselinux-devel.x86_64 0:2.0.94-5.2.el6 will be installed
–> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-5.2.el6.x86_64
–> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-5.2.el6.x86_64
—> Package openssl.i686 0:1.0.0-20.el6 will be installed
—> Package zlib.i686 0:1.2.3-27.el6 will be installed
–> Running transaction check
—> Package keyutils-libs.i686 0:1.4-3.el6 will be installed
—> Package libcom_err.i686 0:1.41.12-11.el6 will be installed
—> Package libselinux.i686 0:2.0.94-5.2.el6 will be installed
—> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
—> Package nss-softokn-freebl.i686 0:3.12.9-11.el6 will be installed
–> Finished Dependency Resolution
Error: Protected multilib versions: krb5-libs-1.9-22.el6.i686 != krb5-libs-1.9-22.el6_2.1.x86_64
Error: Protected multilib versions: mysql-libs-5.1.52-1.el6_0.1.i686 != mysql-libs-5.1.61-1.el6_2.1.x86_64

You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
[root@Linux-vm1 cron.d]# yum downgrade krb5-libs mysql-libs
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Downgrade Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
–> Running transaction check
—> Package krb5-libs.x86_64 0:1.9-22.el6 will be a downgrade
—> Package krb5-libs.x86_64 0:1.9-22.el6_2.1 will be erased
—> Package mysql-libs.x86_64 0:5.1.52-1.el6_0.1 will be a downgrade
—> Package mysql-libs.x86_64 0:5.1.61-1.el6_2.1 will be erased
–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package                         Arch                        Version                                Repository                 Size
====================================================================================================================================
Downgrading:
krb5-libs                       x86_64                      1.9-22.el6                             base                      708 k
mysql-libs                      x86_64                      5.1.52-1.el6_0.1                       base                      1.2 M

Transaction Summary
====================================================================================================================================
Downgrade     2 Package(s)

Total download size: 1.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): krb5-libs-1.9-22.el6.x86_64.rpm                                                                       | 708 kB     00:00
(2/2): mysql-libs-5.1.52-1.el6_0.1.x86_64.rpm                                                                | 1.2 MB     00:00
————————————————————————————————————————————
Total                                                                                                40 MB/s | 1.9 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysql-libs-5.1.52-1.el6_0.1.x86_64                                                                               1/4
Installing : krb5-libs-1.9-22.el6.x86_64                                                                                      2/4
Cleanup    : krb5-libs-1.9-22.el6_2.1.x86_64                                                                                  3/4
Cleanup    : mysql-libs-5.1.61-1.el6_2.1.x86_64                                                                               4/4

Removed:
krb5-libs.x86_64 0:1.9-22.el6_2.1                               mysql-libs.x86_64 0:5.1.61-1.el6_2.1

Installed:
krb5-libs.x86_64 0:1.9-22.el6                                 mysql-libs.x86_64 0:5.1.52-1.el6_0.1

Complete!

 

[root@Linux-vm1 cron.d]# yum install mysql-devel
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mysql-devel.x86_64 0:5.1.52-1.el6_0.1 will be installed
–> Processing Dependency: mysql = 5.1.52-1.el6_0.1 for package: mysql-devel-5.1.52-1.el6_0.1.x86_64
–> Processing Dependency: openssl-devel for package: mysql-devel-5.1.52-1.el6_0.1.x86_64
–> Running transaction check
—> Package mysql.x86_64 0:5.1.52-1.el6_0.1 will be installed
—> Package openssl-devel.x86_64 0:1.0.0-20.el6 will be installed
–> Processing Dependency: zlib-devel for package: openssl-devel-1.0.0-20.el6.x86_64
–> Processing Dependency: krb5-devel for package: openssl-devel-1.0.0-20.el6.x86_64
–> Running transaction check
—> Package krb5-devel.x86_64 0:1.9-22.el6 will be installed
–> Processing Dependency: libcom_err-devel for package: krb5-devel-1.9-22.el6.x86_64
–> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.9-22.el6.x86_64
–> Processing Dependency: libselinux-devel for package: krb5-devel-1.9-22.el6.x86_64
—> Package zlib-devel.x86_64 0:1.2.3-27.el6 will be installed
–> Running transaction check
—> Package keyutils-libs-devel.x86_64 0:1.4-3.el6 will be installed
—> Package libcom_err-devel.x86_64 0:1.41.12-11.el6 will be installed
—> Package libselinux-devel.x86_64 0:2.0.94-5.2.el6 will be installed
–> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-5.2.el6.x86_64
–> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-5.2.el6.x86_64
–> Running transaction check
—> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package                                Arch                      Version                             Repository               Size
====================================================================================================================================
Installing:
mysql-devel                            x86_64                    5.1.52-1.el6_0.1                    base                    126 k
Installing for dependencies:
keyutils-libs-devel                    x86_64                    1.4-3.el6                           base                     28 k
krb5-devel                             x86_64                    1.9-22.el6                          base                    1.2 M
libcom_err-devel                       x86_64                    1.41.12-11.el6                      base                     31 k
libselinux-devel                       x86_64                    2.0.94-5.2.el6                      base                    136 k
libsepol-devel                         x86_64                    2.0.41-4.el6                        base                     64 k
mysql                                  x86_64                    5.1.52-1.el6_0.1                    base                    889 k
openssl-devel                          x86_64                    1.0.0-20.el6                        base                    1.1 M
zlib-devel                             x86_64                    1.2.3-27.el6                        base                     44 k

Transaction Summary
====================================================================================================================================
Install       9 Package(s)

Total download size: 3.6 M
Installed size: 8.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): krb5-devel-1.9-22.el6.x86_64.rpm                                                                      | 1.2 MB     00:00
(2/9): libcom_err-devel-1.41.12-11.el6.x86_64.rpm                                                            |  31 kB     00:00
(3/9): libsepol-devel-2.0.41-4.el6.x86_64.rpm                                                                |  64 kB     00:00
(4/9): zlib-devel-1.2.3-27.el6.x86_64.rpm                                                                    |  44 kB     00:00
(5/9): libselinux-devel-2.0.94-5.2.el6.x86_64.rpm                                                            | 136 kB     00:00
(6/9): mysql-devel-5.1.52-1.el6_0.1.x86_64.rpm                                                               | 126 kB     00:00
(7/9): mysql-5.1.52-1.el6_0.1.x86_64.rpm                                                                     | 889 kB     00:00
(8/9): openssl-devel-1.0.0-20.el6.x86_64.rpm                                                                 | 1.1 MB     00:00
(9/9): keyutils-libs-devel-1.4-3.el6.x86_64.rpm                                                              |  28 kB     00:00
————————————————————————————————————————————
Total                                                                                                54 MB/s | 3.6 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : keyutils-libs-devel-1.4-3.el6.x86_64                                                                             1/9
Installing : mysql-5.1.52-1.el6_0.1.x86_64                                                                                    2/9
Installing : zlib-devel-1.2.3-27.el6.x86_64                                                                                   3/9
Installing : libsepol-devel-2.0.41-4.el6.x86_64                                                                               4/9
Installing : libselinux-devel-2.0.94-5.2.el6.x86_64                                                                           5/9
Installing : libcom_err-devel-1.41.12-11.el6.x86_64                                                                           6/9
Installing : krb5-devel-1.9-22.el6.x86_64                                                                                     7/9
Installing : openssl-devel-1.0.0-20.el6.x86_64                                                                                8/9
Installing : mysql-devel-5.1.52-1.el6_0.1.x86_64                                                                              9/9

Installed:
mysql-devel.x86_64 0:5.1.52-1.el6_0.1

Dependency Installed:
keyutils-libs-devel.x86_64 0:1.4-3.el6       krb5-devel.x86_64 0:1.9-22.el6           libcom_err-devel.x86_64 0:1.41.12-11.el6
libselinux-devel.x86_64 0:2.0.94-5.2.el6     libsepol-devel.x86_64 0:2.0.41-4.el6     mysql.x86_64 0:5.1.52-1.el6_0.1
openssl-devel.x86_64 0:1.0.0-20.el6          zlib-devel.x86_64 0:1.2.3-27.el6

Complete!
[root@Linux-vm1 cron.d]#