【发布时间】:2020-07-01 13:52:16
【问题描述】:
我已经厌倦了添加这个 ruby repo 来安装 2.4 版本的 ruby,错误消息如下所示
sudo apt-add-repository ppa:brightbox/ruby-ng
但是我得到了这个错误我已经尝试了所有这些链接
python add-apt-repository: ImportError: No module named 'apt_pkg'
How to fix 'ModuleNotFoundError: No module named 'apt_pkg'?
Traceback (most recent call last):
File "/usr/bin/apt-add-repository", line 11, in <module>
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 28, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
【问题讨论】: