栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

add-apt-repository命令AttributeError: ‘Thread‘ object has no attribute ‘isAlive‘的解决方案

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

add-apt-repository命令AttributeError: ‘Thread‘ object has no attribute ‘isAlive‘的解决方案

问题:

今天在安装软件包的时候,发现执行add-apt-repository命令会出现错误,无法添加软件源

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 191, in 
    if not sp.add_source_from_shortcut(shortcut, options.enable_source):
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 777, in add_source_from_shortcut
    if worker.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'
原因:

文件SoftwareProperties.py里引用了"isAlive",电脑上安装的Python版本是3.9.2,3.9已不支持这个方法。

解决方案:

修改"/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py"文件,第777行的"isAlive"改成"is_alive"即可。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/291758.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号