解决yum升级的问题“There was a problem importing one of the Python modules”

yum命令升级的时候,报出这个错误。

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

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Sep  3 2013, 23:16:48)
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)]

解决方法:

<span style="font-size:18px;"> sudo vim /usr/bin/yum

#修个python所在的路径,例如
#/usr/local/bin/python2.6</span>

解决yum升级的问题“There was a problem importing one of the Python modules”,布布扣,bubuko.com

时间: 2024-11-05 16:09:53

解决yum升级的问题“There was a problem importing one of the Python modules”的相关文章

CentOS7 升级python同时解决yum损坏问题

CentOS7中的python版本为python2.7.5,升级到最新版的python时需要注意两个问题 新版的python安装好后要修改python的系统默认指向问题 升级到最新版python后yum报错的问题 下面对新版的安装步骤进行说明. 一.下载并安装最新版python 1.下载并解压 # wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz # tar -zxf Python-3.5.2.tgz 2.安装Python

CentOS6下yum升级Zabbix2.2/2.4到Zabbix3.0

本文适用于在CentOS6下zabbix2.2及以上版本升级到zabbix3.0.     zabbix3.0的环境要求: Software Version Comments MySQL 5.0.3 or later Apache 1.3.12 or later PHP 5.4.0 or later PHP v7 is not supported yet. libcurl  For SMTP authentication, version 7.20.0 or higher is required

centos yum升级php

centos yum升级php5.3.3到最5.6.3 不要轻易升级,否则后果很严重! 注意事项: 1 升级后之前的php扩展不会丢失 自动会安装对应最新php的扩展2 升级后需重启下apache 才能看到3 升级时候会提示 Loaded plugins: fastestmirror Determining fastest mirrors 参考后面修改,重新执行即可 4 如果失败一般是yum源的问题 注意是对应的64位 centos6.5的php预设5.3.3这个版本,其实对centos来说就是

sql server 2008 提示评估期已过的解决方法(升级无效)

提示窗口: 解决步骤: 第一步:进入SQL2008配置工具中的安装中心 第二步:再进入维护界面,选择版本升级 第三步:进入产品密钥,输入密钥 第四步:一直点下一步,直到升级完毕. SQL Server 2008 Developer(开发版):PTTFM-X467G-P7RH2-3Q6CG-4DMYB SQL Server 2008 Enterprise(企业版):JD8Y6-HQG69-P9H84-XDTPG-34MBB 注意:如以上选择“版本升级”总提示“失败”并要求“重启计算机”时,请把进程

利用yum升级操作系统版本(目前最新6.6)

1. 查看操作系统版本 [[email protected] ~]# cat /etc/redhat-releaseCentOS release 6.4 (Final) 2. 让操作系统能够与外网通信 [[email protected] ~]# ping www.baidu.comPING www.a.shifen.com (119.75.218.70) 56(84) bytes of data.64 bytes from 119.75.218.70: icmp_seq=1 ttl=128 t

解决yum报错:UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode ... ordinal not in range

在使用yum部署环境的时候,出现了报错: UnicodeDecodeError: 'ascii' codec can't decode ... ordinal not in range 解决办法: [[email protected] ~]# ll /var/lib/rpm/*db*-rw-r--r-- 1 root root 73728 Aug 15 14:52 /var/lib/rpm/__db.001-rw-r--r-- 1 root root 270336 Aug 15 14:52 /v

centos怎么解决yum 出现 File “/usr/bin/yum”, line 29

来自:http://www.demopu.com/?p=599 错误如下:Python123456789101112131415161718192021222324252627282930313233343536373839[[email protected]/]# yum instal pppLoaded plugins:fastestmirrorNo such command:instal.Please use/usr/bin/yum–help[[email protected]/]# yu

使用yum升级CentOS 6.5 kernel至3.10.52

we will use ELRepo to install kernel 1. rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org 2. rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm 3. yum --enablerepo=elrepo-kernel -y install kernel-lt 4. vi /etc/grub.conf

【转】解决yum安装软件报Couldn&#39;t resolve host &#39;mirrorlist.centos.org问题

转自:http://blog.51cto.com/oldcat1981/1719825 今天在linux环境通过yum安装软件报了以下错误: [[email protected] yum.repos.d]# yum install ncurses devel -y Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http