Hello guys!
I would like to provide a solution for anyone who is having a problem updating the debian template on QubesOS. I've been trying to update for many days, and Debian just won't update. Returned the message:
Updating debian-11 Error on updating debian-11: Command '['sudo', 'qubesctl', '--skip-dom0', '--targets=debian-11', '--show-output', 'state.sls', 'update.qubes-vm']' returned non-zero exit status 20. debian-11: ---------- ID: update Function: pkg.uptodate Result: False Comment: Problem encountered upgrading packages. Additional info follows:
result: ---------- pid: 1711 retcode: 100 stderr:
Running scope as unit:
run-rf92cbced4a364bc8b5759b5c72905e21.scope E:
dpkg was interrupted, you must manually run
'dpkg --configure -a' to correct the problem.
stdout: Started: 23:46:38.569288 Duration: 9040.763
ms
Changes: ---------- ID: notify-updates Function: cmd.run Name:
/usr/lib/qubes/upgrades-status-notify
Result: True Comment: Command
"/usr/lib/qubes/upgrades-status-notify" run Started:
23:46:47.618830
Duration: 5413,652 msChanges: ---------- pid: 1714 retcode: 0
stderr: stdout:
Summary for debian-11 ------------ Succeeded: 1 (changed=1) Failed: 1 ------------ Total states run: 2 Total run time: 14,454 s
The solution for this, assuming the time is correct on the system, is to open a terminal in Template: debian-11, accessible through the menu in Dom0, type the commands:
sudo dpkg --configure -a
sudo qubesctl --skip-dom0 --targets=debian-11 state.sls update.qubes-vm
The alternative to the second command is to use the refresh icon next to the keyboard. The advantage of this second option is being able to see the update process and being easier than typing the command without making mistakes.