【问题标题】:YUM complains about PyYAML and libyaml in CentOS 5.8YUM 抱怨 CentOS 5.8 中的 PyYAML 和 libyaml
【发布时间】:2012-04-22 00:16:02
【问题描述】:

每次我尝试 #sudo yum update 时,我都会收到警告说 PyYAML-3.08-4.el5.x86_64 缺少依赖项 libyaml-0.so.1()(64bit)。

所以我做了一些检查,似乎确实安装了 libyaml,所以我想知道我的 PyYAML 和 libyaml 安装有什么问题。 libyaml 是由 PyYAML 自动提取的,这让我认为 repo 发生了一些奇怪的事情。 YUM 的输出如下:

[root@am-web-1 ~]# 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 到底在哪里?

[alexander@am-web-1 ~]$ 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

那么图书馆存在吗?

[alexander@am-web-1 ~]$ ls /usr/lib64/libyaml-0.so.1*
/usr/lib64/libyaml-0.so.1  /usr/lib64/libyaml-0.so.1.1.0

64位的可以,32位的可以吗?

[alexander@am-web-1 ~]$ ls /usr/lib/libyaml-0.so.1*
/usr/lib/libyaml-0.so.1  /usr/lib/libyaml-0.so.1.1.0

它们都存在,那有什么问题?!?

【问题讨论】:

    标签: dependencies centos yum pyyaml


    【解决方案1】:

    受@ewwhite 的回答启发,我发现这样做效果很好

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

    【讨论】:

      【解决方案2】:

      这更像是一个ServerFault 问题,但我在更新/安装 Cobbler 时遇到了同样的问题。这是您此时启用的多个存储库的问题。同时永久启用两个存储库通常是不好的做法。来自RPMForgelibyaml 包与通过EPEL 存储库提供的包之间存在轻微冲突。

      要修复,请通过yum erase libyaml 删除 RPMForge 包,然后通过yum update --disablerepo=rpmforge 继续更新。您还可以通过从 RPMForge 存储库配置文件中永久排除该特定包来采取额外的步骤...

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-06-18
        • 2012-09-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-08-18
        • 1970-01-01
        • 2017-05-03
        相关资源
        最近更新 更多