yum list时报错的解决:Fatal Python error: pycurl: libcurl link-time version is older than compile-time vers... - Go语言中文社区

yum list时报错的解决:Fatal Python error: pycurl: libcurl link-time version is older than compile-time vers...


执行yum的各种命令时报以下错误,如yum list:

Fatal Python error: pycurl: libcurl link-time version is older than compile-time version
Aborted

 

解决:

1、安装setuptools

wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
tar -zxvf setuptools-19.6.tar.gz
cd setuptools-19.6
python setup.py build
python setup.py install

报错: RuntimeError: Compression requires the (missing) zlib module
解决:yum install zlib-devel

 

2、安装pip

wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb
tar -zxvf pip-8.0.2.tar.gz
cd pip-8.0.2
python setup.py build
python setup.py install
报错:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  解决:
  yum install openssl
  yum install openssl-devel

 升级pip(可选):

pip install --upgrade pip

 

3、下载python-devel包并安装

下载地址:http://rpmfind.net/linux/rpm2html/search.php?query=python-devel

由于系统是centos7的,所以下载以下包:

wget http://rpmfind.net/linux/centos/7.6.1810/os/x86_64/Packages/python-devel-2.7.5-76.el7.x86_64.rpm

rpm -ivh python-devel-2.7.5-76.el7.x86_64.rpm

 

4、卸载pycurl:
pip uninstall pycurl

export PYCURL_SSL_LIBRARY=openssl

 

5、再次安装pycurl:
pip install pycurl

再次运行 yum正常了。

 

注:如果yum list命令还是会报错:

FatalPythonerror:pycurl: libcurl link-time version is older than compile-time version
Aborted

问题可能是环境造成的。在 /etc/profile末尾加上:
export LD_LIBRARY_PATH=/usr/lib64:/usr/lib:/usr/local/VMProg/lib:/usr/local/VMProg/lib/vmware-vix-disklib/lib64:/lib64:${LD_LIBARY_PATH}
保存退出。

source /etc/profile

执行yum list正常了。

搞定。

转载于:https://www.cnblogs.com/hy007x/p/11175189.html

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_30748995/article/details/95881544
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-01 21:04:06
  • 阅读 ( 1497 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢