今天计划安装walle2.0,按官方文档http://www.walle-web.io/docs/index.html一步步进行

进行到这一步突然报错

yum install -y mariadb-devel gcc gcc-c++ python-devel

刚开始怀疑是不是yum源出问题了,把阿里云的源重新下载加载

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

wget-O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo

yum clean all

yum makecache

发现不行,还是报错

检查下python版本

# python

Python2.7.5 (default, Oct 30 2018, 23:45:53)

发现python已经被升级到2.7.5,而yum需要的python版本是2.6,导致的报错

修改yum启动文件前缀

# cat /usr/bin/yum

#!/usr/bin/python2.7

发现没有用,没有备份,python直接被更新到2.7.5,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.

查找资料,尝试再安装个python2.6.6版本,修改yum启动文件,但是还是出现模块不能加载

重装python和yum

1、卸载现有的python,强制删除已安装程序及其关联

rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps

强制删除所有残余文件

whereis python |xargs rm -frv

2、卸载现有的yum

rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps

强制删除所有残余文件

whereis yum |xargs rm -frv

3、下载版本对应的rpm包

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/rpm-4.11.3-35.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/rpm-build-4.11.3-35.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/rpm-build-libs-4.11.3-35.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/rpm-libs-4.11.3-35.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/rpm-sign-4.11.3-35.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/rpm-python-4.11.3-35.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-2.7.5-76.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-devel-2.7.5-76.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-libs-2.7.5-76.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-pycurl-7.19.0-19.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-setuptools-0.9.8-7.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-9.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-backports-1.0-8.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-ipaddress-1.0.16-2.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/python-virtualenv-15.1.0-2.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-utils-1.1.31-50.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-plugin-protectbase-1.1.31-50.el7.noarch.rpm

wget http://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-plugin-aliases-1.1.31-50.el7.noarch.rpm

下载完成后安装这些包(--force强制安装)

rpm -Uvh --force --nodeps --replacepkgs *.rpm

安装完这些rpm包后,yum就可以正常使用了,如果还是报下面这个,说明你rpm包没下载全

There was a problem importing one of the Python modules

required to run yum. The error leading tothisproblem was:/usr/lib64/python2.7/site-packages/rpm/_rpm.so: undefined symbol: rpmpkgVerifySi

Please install a package which providesthismodule, or

verify that the moduleisinstalled correctly.

It's possible that the above module doesn't match the

current version of Python, whichis:2.7.5 (default, Apr 11 2018, 07:36:10)

[GCC4.8.5 20150623 (Red Hat 4.8.5-28)]

If you cannot solvethisproblem yourself, please go to

the yum faq at:

http://yum.baseurl.org/wiki/Faq

接着按walle官方文档一步步安装,就很顺利安装完了,大功告成~ :)

重要的事情说三遍

python升级用下载的包升级,升级前先备份旧版本!!!

python升级用下载的包升级,升级前先备份旧版本!!!

python升级用下载的包升级,升级前先备份旧版本!!!

python版本升级导致_python升级导致yum使用报错相关推荐

  1. CentOS系统yum源使用报错:Error: Cannot retrieve repository metadata

    服务器上的yum突然不好使用,使用yum的时候报错如下: [root@bastion-IDC src]# yum list ...... Could not retrieve mirrorlist h ...

  2. Python安装xlrd和xlwt的步骤以及使用报错的解决方法

    Python安装xlrd和xlwt的步骤以及使用报错的解决方法 参考文章: (1)Python安装xlrd和xlwt的步骤以及使用报错的解决方法 (2)https://www.cnblogs.com/ ...

  3. git使用报错:fatal: Couldn't find remote ref master的解决方法

    git使用报错:fatal: Couldn't find remote ref master的解决方法 fatal: Couldn't find remote ref master 翻译过来就是:致命 ...

  4. 记录webpack使用问题,使用报错“UnhandledPromiseRejectionWarning,file-loader图片过大,无法加载图片,打包html文件报错TypeError

    记录webpack使用报错 版本号问题 运行npm run build,报错 "UnhandledPromiseRejectionWarning: TypeError: this.getRe ...

  5. Assets.car 解压工具 cartool 使用报错 segmentation fault cartool 解决方案

    Assets.car 解压工具 cartool 使用报错 segmentation fault cartool 解决方案 参考文章: (1)Assets.car 解压工具 cartool 使用报错 s ...

  6. “this”不能在常量表达式中使用报错的解决方法

    "this"不能在常量表达式中使用报错的解决方法 问题描述与思考 在用C++书写下面一段代码时,编译器报错"'this'不能在常量表达式中使用".在这里,我最开 ...

  7. git使用报错: fatal: Couldn‘t find remote ref master的解决方法

    git使用报错: fatal: Couldn't find remote ref master的解决方法 参考文章: (1)git使用报错: fatal: Couldn't find remote r ...

  8. cnpm使用报错-最佳方案

    问题:cnpm使用报错throw err;^Error: Cannot find module 'fs/promises 现象: 解决方案: 查看你的cnpm的版本是不是高于8.2.0 cnpm 8. ...

  9. git使用报错:fatal: Couldn‘t find remote ref master的解决方法

    git使用报错:fatal: Couldn't find remote ref master的解决方法 参考文章: (1)git使用报错:fatal: Couldn't find remote ref ...

最新文章

  1. 如何正确使用as follows 与 following
  2. 记录一下水下相机标定
  3. 疲劳容器的定义_疲劳分析基础
  4. 春风吹用计算机的谱子,方大同《春风吹》简谱
  5. [LeetCode] Permutations
  6. 【bzoj1263】[SCOI2006]整数划分 高精度
  7. linux proc文件 write的原子性,Linux命令之write调用的原子性
  8. 【M1兼容】阿里云盘小白羊版 Mac版(支持满速)
  9. 吴恩达深度学习1.3练习_Neural Networks and Deep Learning
  10. 字符串的连接(复习)
  11. HBase学习总结(1):HBase的下载与安装
  12. 图新地球点云大师:点云数据三维可视化管理及等高线提取
  13. LeetCode中等题之整数转罗马数字
  14. 安装tensorflow踩的那些坑
  15. python求小于n的最大素数_找出小于n的最大素数,其中n =〜10 ^ 230 - python
  16. Python-常用数据结构(字典)-Dict
  17. CTF密码学解题思路
  18. 拓嘉辰丰电商:拼多多推广主要有哪些模式
  19. 移动硬盘使用什么文件系统格式
  20. pycharm如何设置官方中文?pycharm如何汉化?pycharm终于支持官中了!!!

热门文章

  1. 中国风冬日节日必备梅花PNG免扣素材
  2. 促销惊喜活动优惠海报设计,可临摹PSD分层格式
  3. UI素材模板|App搜索页UI界面设计版式
  4. 华为p4支持鸿蒙功能吗_什么样的手机可以刷鸿蒙系统?看看你的手机支持吗?...
  5. linux设备文件生成,Linux设备文件自动生成(示例代码)
  6. 使用 systemd 定时器调度任务
  7. C语言线性表之循环单链表
  8. python模型训练框架_以Python撰写 AI模型框架
  9. Python组合数据类型:字典dictionary
  10. CSS文本溢出的处理方法总结