2012-04-09 101 views
3

我每次嘗試#sudo yum update時,都會收到PyYAML-3.08-4.el5.x86_64缺少依賴項的警告,libyaml-0.so.1() (64位)。YUM在CentOS 5.8中抱怨PyYAML和libyaml

所以我做了一些檢查,看來libyaml確實已安裝,所以我想知道我的PyYAML和libyaml的安裝有什麼問題。 Pyyaml自動地提取了libyaml,這讓我認爲回購協議有些奇怪的事情發生。從YUM輸出如下:

[[email protected] ~]# yum update 
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
* base: mirror01.th.ifl.net 
* epel: mirror01.th.ifl.net 
* extras: mirror01.th.ifl.net 
* rpmforge: fr2.rpmfind.net 
* updates: mirror01.th.ifl.net 
Excluding Packages from CentOS-5 - Base 
Finished 
Reducing CentOS-5 Testing to included packages only 
Finished 
Excluding Packages from CentOS-5 - Updates 
Finished 
Setting up Update Process 
Resolving Dependencies 
--> Running transaction check 
---> Package git.x86_64 0:1.7.10-1.el5.rf set to be updated 
--> Processing Dependency: libyaml-0.so.1()(64bit) for package: PyYAML 
---> Package libyaml.x86_64 0:0.1.4-1.el5.rf set to be updated 
---> Package perl-Git.x86_64 0:1.7.10-1.el5.rf set to be updated 
--> Finished Dependency Resolution 
PyYAML-3.08-4.el5.x86_64 from installed has depsolving problems 
    --> Missing Dependency: libyaml-0.so.1()(64bit) is needed by package PyYAML-3.08-4.el5.x86_64 (installed) 
Error: Missing Dependency: libyaml-0.so.1()(64bit) is needed by package PyYAML-3.08-4.el5.x86_64 (installed) 
You could try using --skip-broken to work around the problem 
You could try running: package-cleanup --problems 
         package-cleanup --dupes 
         rpm -Va --nofiles --nodigest 

因此,我們知道我們有一個問題,所以這是哪裏libyaml呢?

[[email protected] ~]$ yum whatprovides "*/libyaml-0.so.1"   
Loaded plugins: fastestmirror 
Excluding Packages from CentOS-5 - Base 
Finished 
Reducing CentOS-5 Testing to included packages only 
Finished 
Excluding Packages from CentOS-5 - Updates 
Finished 
libyaml-0.1.2-3.el5.i386 : YAML 1.1 parser and emitter written in C 
Repo  : epel 
Matched from: 
Filename : /usr/lib/libyaml-0.so.1 

libyaml-0.1.2-3.el5.x86_64 : YAML 1.1 parser and emitter written in C 
Repo  : epel 
Matched from: 
Filename : /usr/lib64/libyaml-0.so.1 

libyaml-0.1.2-3.el5.x86_64 : YAML 1.1 parser and emitter written in C 
Repo  : installed 
Matched from: 
Filename : /usr/lib64/libyaml-0.so.1 

libyaml-0.1.2-3.el5.i386 : YAML 1.1 parser and emitter written in C 
Repo  : installed 
Matched from: 
Filename : /usr/lib/libyaml-0.so.1 

那麼庫存在嗎?

[[email protected] ~]$ ls /usr/lib64/libyaml-0.so.1* 
/usr/lib64/libyaml-0.so.1 /usr/lib64/libyaml-0.so.1.1.0 

64bit一個,32bit一個嗎?

[[email protected] ~]$ ls /usr/lib/libyaml-0.so.1* 
/usr/lib/libyaml-0.so.1 /usr/lib/libyaml-0.so.1.1.0 

它們都存在,所以有什麼問題?!?

回答

5

這是更多的ServerFault問題,但我已經看到更新/安裝Cobbler相同的問題。這是您在此時啓用的多個回購協議的問題。同時永久啓用兩個回購協議通常是不好的做法。來自RPMForgelibyaml包與通過EPEL存儲庫提供的包之間存在輕微衝突。

要修復,請通過yum erase libyaml擦除RPMForge軟件包,然後繼續使用yum update --disablerepo=rpmforge更新。您還可以通過永久地從你的rpmforge軟件庫的配置文件不包括特定的包去一個額外的步驟...

1

通過@ewwhite的回答啓發,我發現這樣做效果很好

yum erase libyaml 
yum install --disablerepo=rpmforge libyaml-devel