分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

centos7系统升级后yum update 出错No module named pycurl

发布时间:2023-09-06 01:37责任编辑:林大明关键词:url
Centos7升级后,运行yum update 结果如下 :
]# yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named pycurl

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, May ?3 2017, 07:55:04)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq

安装pycurl:

pip install pycurl

Collecting pycurl
Using cached pycurl-7.43.0.1.tar.gz
Installing collected packages: pycurl
Running setup.py install for pycurl ... done
Successfully installed pycurl-7.43.0.1

测试升级,运行yum update
]# yum updae
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)

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, May ?3 2017, 07:55:04)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq

网上找了好多资料,没有一个合适,检查另外一个相同配置的电脑,发现pycurl的版本是7.19.0 。卸载pycurl7.43.0,pip uninstall pycurl.重新安装指定的版本:pip install pycurl==7.19.0
]# pip install pycurl==7.19.0
Collecting pycurl==7.19.0
Using cached pycurl-7.19.0.tar.gz
Installing collected packages: pycurl
Running setup.py install for pycurl ... done
Successfully installed pycurl-7.19.0
测试升级,运行yum update
]# yum update -y
Loaded plugins: amazon-id, fastestmirror, rhui-lb, search-disabled-repos
Loading mirror speeds from cached hostfile

  • city-fan.org: www.city-fan.org
  • epel: ny-mirrors.evowise.com
  • rhui-REGION-client-config-server-7: rhui2-cds02.us-east-1.aws.ce.redhat.com
  • rhui-REGION-rhel-server-releases: rhui2-cds02.us-east-1.aws.ce.redhat.com
  • rhui-REGION-rhel-server-rh-common: rhui2-cds02.us-east-1.aws.ce.redhat.com
    No packages marked for update
    成功执行命令

后记,开始安装pycurl的时候,只能手动去安装。由于是云主机,直接下载相同版本的iso镜像文件(3分钟下载5G左右的文件),挂载并拷贝2个rpm文件到本地系统。libcurl-7.29.0-42.el7.x86_64.rpm , ?libcurl-devel-7.29.0-42.el7.x86_64.rpm

由于包依赖,单独安装失败,进入到rpm所在文件夹,运行命令安装,rpm -Uvh *.rpm --nodeps --force

centos7系统升级后yum update 出错No module named pycurl

原文地址:http://blog.51cto.com/10108149/2062449

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved