update-notifier报错AttributeError
E: 未知错误:“<class ‘AttributeError’>”(module ‘apt_pkg’ has no attribute ‘Error’)
分析
首先查到该服务在/usr/lib/update-notifier/
路径下存在一些脚本,其中apt-check -> apt_check.py
就是元凶。
在我的系统中,报错的代码段如下:
|
|
apt_pkg.Error
属性不存在,而从python-apt
来看,是存在的,且:
It inherits from
SystemError
, so make sure to catch this class first.
而apt_pkg是一个动态库:
|
|
估计是版本有问题,重装一下:
|
|
没效果,直接改文件:
|
|
完毕。