运行yum install 安装时报错

File "/usr/libexec/urlgrabber-ext-down", line 28 except OSError, e:

SyntaxError: invalid syntax

经过网上查找原因,找到解决方案是:

1.
vim /usr/libexec/urlgrabber-ext-down
将/usr/bin/python改为/usr/bin/python2.7。
2.
vim /usr/bin/yum-config-manager
 #!/usr/bin/python换成 #!/usr/bin/python2.7

PS. 这边我是修改 vim /usr/bin/yum

【Centos】【Python3】yum install 报错的更多相关文章

  1. centos在yum install报错:Another app is currently holding the yum lock解决方法

    centos在yum install报错:Another app is currently holding the yum lock,这个问题可能是很多的新手经常遇到问题,之前也有人问我,包括本人在刚 ...

  2. ubuntu,装完PYTHON3 pip3 install 报错

    ubuntu,装完PYTHON3 pip3  install 报错CalledProcessError: Command 'lsb_release -a' returned non-zero exit ...

  3. yum install 报错

    把python2升级到python3以后,yum报错: [root@localhost Python-]# yum install openssl File except KeyboardInterr ...

  4. yum install 报错[Errno 14] curl#37 - Couldn't open file /mnt/repodata/repomd.xml

    最近在玩centos7,之前装系统没太注意yum这个东东,今天用别人装好的系统想用yum install 一个东西,结果报各种错,所以就是: 1.然后按照网上的一些修改,先是执行: yum cleam ...

  5. yum install 报错[Errno 14] curl#37 - Couldn't open file /mnt/repodata/repomd.xml

    1.然后按照网上的一些修改,先是执行: yum cleam all 然后 yum makecache,问题还是没解决,继续报错. 其实这两条命令就是清空缓存,然后再重新缓存的意思,有时候可能有效. 2 ...

  6. centos使用yum安装报错: 另一个应用程序是:PackageKit

    已加载插件:fastestmirror, langpacks/var/run/yum.pid 已被锁定,PID 为 13189 的另一个程序正在运行.Another app is currently ...

  7. Centos下使用yum命令报错 except KeyboardInterrupt, e: SyntaxError: invalid syntax

    使用yum命令报错 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ SyntaxError: invalid ...

  8. 在centos6.7通过源码安装python3.6.7报错“zipimport.ZipImportError: can't decompress data; zlib not available”

    在centos6.7通过源码安装python3.6.7报错: zipimport.ZipImportError: can't decompress data; zlib not available 从 ...

  9. 安装 glusterfs yum源报错

    yum install glusterfs-server yum 一直报错 把/etc/yum.repos.d 备份 删除了所有文件,从测试机192..168.59.128上同步过来 一直报错 已加载 ...

随机推荐

  1. EF事务处理封装公用

    /// <summary> /// EF事务封装 公用类 /// </summary> public class TransactionCommon { DbContextTr ...

  2. 光照渲染[Unity]

    http://www.unitymanual.com/m/Manual/RenderingPaths.html http://wenku.baidu.com/view/54eca9e09b896802 ...

  3. 【驱动】DM9000网卡驱动分析

    Preface    内核源码版本:linux-2.6.18    网卡驱动·linux内核网络分层结构:http://infohacker.blog.51cto.com/6751239/122114 ...

  4. 网易云信消息抄送服务的第三方接口示例(Java)

    package com.netease.nim.route; import com.alibaba.fastjson.JSONObject; import com.netease.nim.route. ...

  5. ss安装

    安装很简单,如下: apt-get install python-pip pip install shadowsocks 配置文件格式如下: { "server":"0. ...

  6. flash object实现视频播放效果

    html: <!--视频缩略图开始-->       <div class="fresh-media fresh-type-video">          ...

  7. LeetCode: Search a 2D Matrix 解题报告

    Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matrix. This m ...

  8. idea linux 启动权限不足的问题

    修改 ideaproject 下所有文件  chmod -R 777 文件  递归修改文件权限

  9. docker探索-swarm搭建docker集群(七)

    前言 Swarm 在 Docker 1.12 版本之前属于一个独立的项目,在 Docker 1.12 版本发布之后,该项目合并到了 Docker 中,成为 Docker 的一个子命令,docker s ...

  10. PostgreSQL学习手册(数据表)<转>

    一.表的定义: 对于任何一种关系型数据库而言,表都是数据存储的最核心.最基础的对象单元.现在就让我们从这里起步吧.    1. 创建表:    CREATE TABLE products (      ...