`

yum出现“No module named yum”错误解决方法

 
阅读更多

 

安装了一个Python2.7,隔天发现yum无法使用,报错信息如下,应该是系统是使用的默认的python2.4的版本

------------------------------------------------------------------------------------------------

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

------------------------------------------------------------------------------------------------




解决办法
修改yum文件
#vi /usr/bin/yum
将 #!/usr/bin/python 修改为 #!/usr/bin/python2.4
分享到:
评论

相关推荐

    CentOS Linux release 7.9.2009,解决 “No module named yum” 错误,安装包

    CentOS Linux release 7.9.2009,解决 “No module named yum” 错误的安装包,因为安装了两个python版本,yum无法使用,修复包备份一哈,以免后面需要。使用前先确定centos版本跟我的一致,cat /etc/centos-release...

    yum源使用的几个报错小总结 (例如: python2.6.6 下yum不能使用: No module named yum)-附件资源

    yum源使用的几个报错小总结 (例如: python2.6.6 下yum不能使用: No module named yum)-附件资源

    rhel6 86_64 使用CentOS yum源

    安装yum,必须按照顺序 .删除redhat原有的 [root@nagios ~]# yum rpm -aq|grep yum|xargs rpm -e --nodeps 2,使用包中提供的4个rpm包 [root@nagios ~]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm ...

    python下setuptools的安装详解及No module named setuptools的解决方法

    主要给大家介绍了关于python下setuptools的安装以及No module named setuptools问题的解决方法,文中介绍的非常详细,对大家具有一定的参考学习价值,需要的朋友们下面来一起看看吧。

    Centos6.8-python-yum-installer

    Centos6.8 python和yum安装包,内含所需rpm和安装说明,...解决在运行yum时可能遇到的No module named rpm 和No module named yum等问题。注意将/usr/bin/yum的第一行设置为所安装的python版本#!/usr/bin/python2.6。

    Django重装mysql后启动报错:No module named ‘MySQLdb’的解决方法

    主要给大家介绍了关于Django重装mysql后启动报错:No module named ‘MySQLdb’的解决方法,分享出来,对同样遇到这个问题的朋友们一个参考学习,需要的朋友们下面随着小编来一起学习学习吧。

    python2.7 yum.rar

    centos7上使用yum遇到no module named yum的解决方法安装包,问题系统版本:CentOS Linux release 7.7.1908,下载安装包后依次执行安装python:rpm -ivh python-* rpm-python-* --nodeps -force --replacepkgs,安装...

    RHEL7更新yum包,python-urlgrabber版本低错误

    这个包安装网易镜像版本时,出现依赖错误,要求安装高版本Python-urlgrabber,下载高版本的Python-urlgrabber安装时,出现一系列的依赖错误,此时可以通过该资源进行替换yum-3.4.3-158.el7.centos.noarch.rpm来解决...

    yum离线安装RPM,解决yum命令报错

    yum离线安装RPM,让你无需到处找RPM文件,一键搞定。 解决报错:/usr/bin/yum: /usr/bin/python: 坏的解释器。 解决报错:No module named yum

    Python升级导致yum、pip报错的解决方法

    主要给大家介绍了因为Python升级导致yum、pip报错的解决方法,文中通过示例代码将解决的方法介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习下吧。

    Python安装pycurl失败的解决方法

    解决MacOS升级后出现xcrun: error: invalid active developer path, missing xcrun的问题 xcode-select --install 然后 dongchang-5:qqmusic baoshan$ pip3 install pycurl Collecting pycurl Using cached pycurl-...

    Python配置mysql的教程(推荐)

    Linux系统自带Python,且根据系统自带资源来对python配置mysql;... ImportError: No module named MySQLdb Linux系统中没有mysql-python的rpm安装包,这个资源需要从网上下载: https://sourceforge.net/p

    Python升级提示Tkinter模块找不到的解决方法

    一、安装tkinter 在Linux中python默认是不安装Tkinter模块, 复制代码 代码如下: [root@li250-193 ~]# python Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux...

    python-xxhash:xxHash的Python绑定

    安装$ pip install xxhash从源安装$ pip install --no-binary xxhash xxhash先决条件在Debian / Ubuntu上: $ apt-get install python-dev gcc 在CentOS / Fedora上: $ yum install python-devel gcc redhat-rpm-...

    Centos7安装python3

    1. 安装依赖包 yum install zlib-devel bzip2...首先先安装libffi-devel包否则python3.7会报如下第四步中ModuleNotFoundError: No module named ‘_ctypes错误 3. 去官网下载编译安装包或者直接执行以下命令下载 wget h

    cmdb平台-django 项目chain

    如果遇到报错 ImportError: No module named '_sqlite3' ,可以执行下面的操作 yum -y install sqlite-devel 重新编译python3.6.4 想在windows 环境下运行,请注释 tasks/views.py 以下两行 from .ansible_2420....

Global site tag (gtag.js) - Google Analytics