繁体   English   中英

在 ubuntu 中添加此存储库时 sudo apt-add-repository ppa:brightbox/ruby-ng 错误

[英]while adding this repo in ubuntu sudo apt-add-repository ppa:brightbox/ruby-ng error

我已经厌倦了添加这个 ruby repo 来安装 ruby 的 2.4 版本,错误消息如下所示

sudo apt-add-repository ppa:brightbox/ruby-ng

但我得到了这个错误我已经尝试了所有这些链接

python add-apt-repository: ImportError: No module named 'apt_pkg'

如何修复'ModuleNotFoundError:没有名为'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'

试试这些方法,看看是否有效

apt-get remove --purge python-apt

接着

apt-get install python-apt

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM