更新curl版本使之支持http2后,yum命令不可用
原因: 参考更新curl,导致yum无法使用 - blueyunchao - 博客园 ,pycurl.so这个库有问题
解决思路升级pycurl
pip install --upgrade pip
报错:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-aTHxqH/pip/
# 升级pip:
1.sudo wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
2.sudo python get-pip.py
3.pip -V
# pip install --upgrade pycurl
报错:ERROR: Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
手动删除pycurl.so文件和egg文件
# rm /usr/lib64/python2.7/site-packages/pycurl.so
# rm /usr/lib64/python2.7/site-packages/pycurl-7.19.0-py2.7.egg-info
删除后再更新安装即可
参考: