如何禁用定期“应用程序应用完全升级已意外关闭”

如何禁用定期“应用程序应用完全升级已意外关闭”

自从我虚拟化了我的 Ubuntu 22.04 分区以来,我会定期(可能是每天?)收到此错误消息。

在此处输入图片描述

我不想重新启动应用程序(因此每次我都必须特别小心地取消选中该选项),我不知道为什么它甚至会在未经我许可的情况下尝试进行全面升级,我想禁止它进行这种尝试!如果我忽略该对话框,大约一天后会在其上方弹出另一个对话框,因此这也不会阻止它再次运行。

当我进入“软件和更新”时,它显示(在“更新”选项卡下)我“订阅”了“仅安全更新”,但没有提供任何订阅低于此级别的更新的方法。它已经设置为自动检查更新“从不”。我还将“通知我新的 Ubuntu 版本”更改为“从不”,但一两天后,这个崩溃报告又弹出来了!

更新:这是评论中请求的命令的输出。

$ grep "Prompt" /etc/update-manager/release-upgrades
Prompt=never
$ do-release-upgrade -c
Checking for a new Ubuntu release
In /etc/update-manager/release-upgrades Prompt 
is set to never so upgrading is not possible.
$ dpkg -s unattended-upgrades | grep "Status"
Status: install ok installed

更新:这是 /var/crash 中剩余文件的一些输出:

ProblemType: Crash
CurrentDesktop: LXQt
ExecutablePath: /usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py
InterpreterPath: /usr/bin/python3.10
ProcCmdline: /usr/bin/python3 /usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py -u 168 -s 166 -p /usr/bin/lubuntu-upgrader

Traceback:
 Traceback (most recent call last):
   File "/usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py", line 266, in <module>
     main(sys.argv, int(options.upgrades), int(options.security_upgrades),
   File "/usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py", line 231, in main
     app = App(upgrades, security_upgrades, reboot_required, upg_path, args)
   File "/usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py", line 223, in __init__
     self.dialog = Dialog(upgrades, security_upgrades, reboot_required,
   File "/usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py", line 59, in __init__
     self.initUI()
   File "/usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py", line 132, in initUI
     td_child = QTreeWidgetItem(p.name)
 TypeError: arguments did not match any overloaded call:
   QTreeWidgetItem(type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(Iterable[str], type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(QTreeWidget, type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(QTreeWidget, Iterable[str], type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(QTreeWidget, QTreeWidgetItem, type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(QTreeWidgetItem, type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(QTreeWidgetItem, Iterable[str], type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(QTreeWidgetItem, QTreeWidgetItem, type: int = QTreeWidgetItem.Type): argument 1 has unexpected type 'str'
   QTreeWidgetItem(QTreeWidgetItem): argument 1 has unexpected type 'str'
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo

答案1

看起来 unattended-upgrades 软件包是导致该错误消息的根本原因。您可以通过几种不同的方式禁用 unattended-upgrades,同时在准备就绪时仍允许手动更新。以下任何一种方法都可以解决问题:

1. 更改 unattended-upgrades 配置

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

将每个选项的 1 更改为 0(APT::定期::更新包列表APT::定期::无人值守升级

2.停止并禁用无人值守升级服务

sudo systemctl stop unattended-upgrades
sudo systemctl disable unattended-upgrades

使用以下命令验证该服务是否不再运行:

systemctl status unattended-upgrades | grep "Active"

3. 卸载 unattended-upgrades 包

sudo apt remove unattended-upgrades

相关内容