【发布时间】:2020-08-24 13:07:07
【问题描述】:
使用本教程 install docker ubuntu 18.04 将 Docker 存储库添加到 APT 源以在 ubuntu 18.04 中安装 docker 时出现以下错误:
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 12, in <module>
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 67, in <module>
from gi.repository import Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)
尝试将 python 版本从 3.7 更改为 3.6,但没有成功。任何帮助将不胜感激。
谢谢。
【问题讨论】:
-
这能回答你的问题吗? Cannot import name '_gi'
-
嘿,试过了。 Din;t 为我工作
-
使用了其中一个 cmets 的答案。工作。谢谢
标签: docker docker-compose dockerfile docker-machine