ubuntu22 执行docker-compose up -d时报错
Traceback (most recent call last): File "/usr/local/bin/docker-compose", line 8, in <module> sys.exit(main())
解决方案如下:
重新安装docker-compose
先删除
sudo rm -r /usr/bin/docker-compose
sudo rm -r /usr/local/bin/docker-compose
然后安装
cd ~/
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version