我有一台运行 CentOS 5.5 的机器,我想升级到最新的 5.x 版本。它被 freetype 绊倒了。
Freetype 同时安装了 i386 和 x86_64 版本。这是正常的,但是 x86_64 版本要新得多(向后移植 2.4 以支持一些其他软件包;我什至没有一台 32 位机器来构建 i386 版本)。
[sh-beta@localhost ~]$ yum list installed | grep freetype
freetype.i386 2.2.1-28.el5_7.2 installed
freetype.x86_64 2.4.8-1 installed
[sh-beta@localhost ~]$ yum list updates | grep freetype
freetype.i386 2.2.1-31.el5_8.1 updates
[sh-beta@localhost ~]$ sudo yum -y update freetype.i386
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cicku.me
* extras: mirrors.sonic.net
* updates: centos.sonn.com
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package freetype.i386 0:2.2.1-31.el5_8.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================================================
Updating:
freetype i386 2.2.1-31.el5_8.1 updates 312 k
Transaction Summary
====================================================================================================================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)
Total size: 312 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Check Error:
package freetype-2.4.8-1.x86_64 (which is newer than freetype-2.2.1-31.el5_8.1.i386) is already installed
Error Summary
-------------
[sh-beta@localhost ~]$
在这台测试机上,我可以手动将 x86_64 软件包降级到基础 CentOS 5.5 版本,然后将两者升级到 5.8 版本都没问题。
[sh-beta@localhost ~]$ sudo yum -y downgrade freetype-2.2.1-28.el5_7.2.x86_64
<...snip...>
[sh-beta@localhost ~]$ yum list installed | grep freetype
freetype.i386 2.2.1-28.el5_7.2 installed
freetype.x86_64 2.2.1-28.el5_7.2 installed
[sh-beta@localhost ~]$ sudo yum update freetype-2.2.1-31.el5_8.1
<...snip...>
[sh-beta@localhost ~]$ yum list installed | grep freetype
freetype.i386 2.2.1-31.el5_8.1 installed
freetype.x86_64 2.2.1-31.el5_8.1 installed
[sh-beta@localhost ~]$
这里发生了什么?我该如何解决?降级是我服务器上最后的手段,因为我有其他依赖 2.4 的软件包。
如果您不需要 i386 vesrion
freetype
则将其删除:rpm -e freetype.i386
如果您需要它,或者其他系统包依赖它,那么请改为执行此操作:为 i386 重建它。如果您仍然拥有在向后移植时生成的源 RPM,那么这就非常简单了。
yum install mock
mock -r epel-5-i386 freetype-2.4.src.rpm