cenyos7安装 yum不可用_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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Alex刘DS爱好者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值