docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got

看你的风 2024-08-29 11:07:02 阅读 51

<code>ubuntu 22.0.4运行docker-compose报错docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked

需要安装`pip install ‘urllib3<2’:

安装pip(如果没有)

apt-get install pip -y

忽略error: externally-managed-environment错误

sudo mv $(find /usr/lib/ -type d -name "*python*" |tail -1)/EXTERNALLY-MANAGED $(find /usr/lib/ -type d -name "*python*" |tail -1)/EXTERNALLY-MANAGED.bk

解决报错ERROR: Cannot uninstall urllib3 2.0.7, RECORD file not found. Hint: The package was installed by debian.

# 如果出现The package was installed by debian这种提示,只需要用python安装一次就不会报错了

sudo pip install --ignore-installed urllib3

sudo pip install --ignore-installed idna

解决依赖问题:

sudo pip install --ignore-reinstall 'requests<2.29.0' 'urllib3<2.0'

enjoy it !!!



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。