Python-devel yum 安装错误

标签 python centos yum

python-devel 的安装失败并附加消息

配置如下:
- CentOS 7.2
- 安装了 Python 2.7

  • 我按照输出中的建议使用 yum load 重新运行,但失败并显示相同的消息。
  • yum info python ==> 安装包 python 2.7.5 34.el7
  • yum info python-devel ==> 未安装。可用 2.7.5 48.el7
  • yum deplist python-devel ==> 依赖于 python2.7.5-48.el7
  • 尝试使用“yum update python”安装 Python2.7.5-48.el7,但失败并显示与 python-devel 安装相同的错误消息。

  • 苏迪尔
    yum install -y python-devel
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirrors.sonic.net
    * epel: ftp.linux.ncsu.edu
    * extras: mirror.cogentco.com
    * updates: www.gtlib.gatech.edu
    Resolving Dependencies
    --> Running transaction check
    ---> Package python-devel.x86_64 0:2.7.5-48.el7 will be installed
    --> Processing Dependency: python(x86-64) = 2.7.5-48.el7 for package: python-devel-2.7.5-48.el7.x86_64
    --> Running transaction check
    ---> Package python.x86_64 0:2.7.5-34.el7 will be updated
    ---> Package python.x86_64 0:2.7.5-48.el7 will be an update
    --> Processing Dependency: python-libs(x86-64) = 2.7.5-48.el7 for package: python-2.7.5-48.el7.x86_64
    --> Running transaction check
    ---> Package python-libs.x86_64 0:2.7.5-34.el7 will be updated
    ---> Package python-libs.x86_64 0:2.7.5-48.el7 will be an update
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    

    ==================================================== =============================== 包 Arch 版本库大小
    Installing:
    python-devel                         x86_64                         2.7.5-48.el7                          base                         393 k
    Updating for dependencies:
    python                               x86_64                         2.7.5-48.el7                          base                          90 k
    python-libs                          x86_64                         2.7.5-48.el7                          base                         5.6 M
    
    Transaction Summary
    ==============================================================================================================================================
    Install  1 Package
    Upgrade             ( 2 Dependent packages)
    
    Total size: 6.1 M
    Downloading packages:
    Running transaction check
    ERROR with transaction check vs depsolve:
    python(abi) = 2.6 is needed by (installed) python-argparse-1.2.1-2.1.el6.noarch
    python(abi) = 2.6 is needed by (installed) redhat-upgrade-tool-1:0.7.22-3.el6.centos.noarch
    ** Found 5 pre-existing rpmdb problem(s), 'yum check' output follows:
    epel-release-7-6.noarch is a duplicate with epel-release-7-5.noarch
    grep-2.20-3.el6_7.1.x86_64 has missing requires of libpcre.so.0()(64bit)
    python-argparse-1.2.1-2.1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
    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)
    Your transaction was saved, rerun it with:
    yum load-transaction /tmp/yum_save_tx.2017-02-13.16-01.jUFBE4.yumtx
    

    最佳答案

    从 yum 文档中,这是处理 5 个错误的最安全方法:

    运行此命令后,首先删除重复项并解决任何错误:

    package-cleanup --cleandupes
    

    如果上面带有缺少包清理错误,那么首先运行它:
    yum install yum-utils
    

    然后解决其他 4 个错误:
    yum reinstall grep-*
    

    其中 grep-* 是错误消息中显示的包名称。我在上面的命令中用 * 缩写了 grep 版本名称的其余部分。

    对指示为丢失的其他 3 个包重复上述命令。如果 yum 命令给你错误,那么只对那个包试试这个:
    rpm -ivh --force grep-*
    

    然后最后从原始错误消息中重新运行 yum 命令。

    在任何时候你想清理剩余的困惑,运行这个命令:
    yum clean all
    package-cleanup --problems
    

    并遵循指示。如需进一步引用,请使用以下方式查找文档
    man yum.conf
    

    关于Python-devel yum 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42216370/

    相关文章:

    python - 使用不带 SDK 和 CLI 的 Python 3 将文件发布到 AWS Mediastore

    jenkins - 部署在服务器上的服务(Jenkins 和 Apache Tomcat)的 Cent OS 防火墙问题

    centos - 子域的 plesk 上的 Varnish

    shell - 在下载 rpm 依赖项之前运行 shell 脚本?

    linux - 安装 graylog-web 时出现问题

    centos - Yum 安装了错误版本的包,有范围要求

    python - 使用OpenCV删除车牌边框(python)

    python - 使用 Tweepy 在用户发推文时收到通知

    python - 灵活使用 collective.z3cform.datagridfield

    php - Apache权限执行exec函数