折腾着搞 openvpn 网站服务器 yum指令 出了点问题

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

[root@cloud ~]# 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.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]

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

原因:

根据报错信息提示,yum 会用到 Python 的某些模块。当前模块安装错误 或者 Python 版本错误

当前错误是 Python 版本错误

解决:

1. 查看yum版本 rpm -qa |grep yum

查看python版本 whereis python

发现 python果然安装了两个版本2.6和2.7版本

2. 编辑 yum 使用的 python 版本

vi /usr/bin/yum

把#!/usr/bin/python改为#!/usr/bin/python2.6

最新文章

  1. Start Instance 操作详解 - 每天5分钟玩转 OpenStack(31)
  2. wps使用技巧
  3. [BS-15] Values of type 'NSInteger' should not be used as format arguments
  4. Sublime Text 3 乱码解决
  5. 关于Eclipse的编码配置和字体大小设置
  6. 2761: [JLOI2011]不重复数字(哈希表)
  7. Learning to Rank简介
  8. 禁止img图片拖动在新窗口打开
  9. time-based基于google key生成6位验证码(google authenticator)
  10. 浅析AngularJS自定义指令之嵌入(transclude)
  11. jQuery中【width(),innerWidth(),outerWidth()】
  12. MySQL5.7.19 服务挂掉 自动关闭 mysqld got exception 0xc000001d win 2008R2
  13. codevs1839洞穴勘测
  14. [转载][转]修改/proc目录下的参数优化网络性能
  15. iOS:面向对象的思想使用sqlite数据库
  16. iOS开发25个性能调优技巧
  17. C#中的Linq使用
  18. oracle中根据时间获取最新的一条数据
  19. 如何高性能的给 UIImageView 加个圆角?
  20. 第二章 你第首个Electron应用 | Electron in Action(中译)

热门文章

  1. Ubuntu下安装deb包命令
  2. P2463 [SDOI2008]Sandy的卡片[差分+串拼接后缀数组]
  3. 【C++】*p++ = *p不同环境下操作不同
  4. python反复执行某个命令
  5. Ubuntu 复制文件,修改文件名
  6. Spring框架中的@Import、@ImportResource注解
  7. 最小化安装linux CentOS-6.6后 部署fastdfs +下载地址 很干很干的干货
  8. java——构造方法重载
  9. CF-851B
  10. SpringBoot使用拦截器无效