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

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

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

时间: 2024-07-31 06:46:20

centos7系统升级后yum update 出错No module named pycurl的相关文章

import yum\r\nImportError: No module named yum

报错:FAILED! => {"changed": false, "module_stderr": "Shared connection to 192.168.10.10 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_NDuf1p/ansible_module_yum

Linux下yum出现no module named pycurl 解决办法

1.1 no module named pycurl 解决办法 下载curl:http://curl.haxx.se/download/curl-7.21.3.tar.gz tar xzf curl-7.21.3.tar.gz ./configure make make install 下载pycurl:http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz tar xzf pycurl-7.19.0.tar.gz cd pycur

yum update 出错

: mirrors.163.com; Unknown error" Trying other mirror. yum-utils-1.1.31-52.el7.noarch FAILED http://ap.stykers.moe/centos/7.7.1908/os/x86_64/Packages/yum-utils-1.1.31-52.el7.noarch.rpm: [Errno 14] curl#6 - "Could not resolve host: ap.stykers.moe

python升级导致yum不可用 “ No module named yum”

最近在看python,虚拟机装的是Centos6.6,自带的python版本是2.6.6,打算升级到2.7. 我的升级过程大致如下: 下载2.7源码包https://www.python.org/downloads/source/ 卸载旧的python,rpm -e python 编译安装python2.7 整个过程没有遇到问题,但升级完后,再用yum安装软件时报如下错误 [[email protected] python]# yum There was a problem importing 

CentOS6.5 安装Python2.7后, yum出现“No module named yum”错误

安装如下方法安装python2.7: yum install –y python27 python27-devel Python-docutils cd /usr/bin/ rm -rf python cp python2.7 python   出现yum错误:No module named yum 解决方法,查看 /usr/bin下python有哪几个版本 ll /usr/bin 我这里是:2.6  和  2.7 (刚安装的) 由于yum命令不兼容python2.7,需修改/usr/bin/y

[linux]centos7 升级python后出现“No module named yum”错误

公司服务器重新安装系统后,手动升级python2.7.5到2.7.15,安装完python在更新系统python版本的过程中无意删除了系统自带的版本,导致后来在执行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 p

centos7安装python3和Django后,ModuleNotFoundError: No module named '_sqlite3'

1.准备安装环境 yum groupinstall 'Development Tools' yum install zlib-devel bzip2-devel openssl-devel ncurses-devel 2.安装python3 去官网下载编译安装包或者直接执行以下命令下载 wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz 解压 tar -xvJf  Python-3.6.2.tar.xz 切换进入 cd

centos7上执行yum group install "Virtualization Hypervisor"出错

centos7上执行yum group install "Virtualization Hypervisor"出错 错误提示:   Transaction check error:   file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.5.x86_64 conflicts with file from package lvm2-7:

CentOS7下的YUM源服务器搭建详解,过程写的很详细(转)

因为近期公司需要搭建一个YUM源服务器给大量的linux(mini)使用,所以因此在网上找了很多的教程,却没有一个特别详细的,很多都有遗漏,参差不齐.所以,打算自己做完之后方便以后查阅,特出此文档. 一:要求 1.这个yum源服务器要能够定期自动更新自身源 2.使用CentOS官方标准源version6和version7的两个版本保持更新 3.linux(mini)客户端可以在使用的时候直接使用源,比如直接命令:yum –y install pcre* 二.思路 1.能够定期更新的源,肯定是需要