Kali does not upgrade - held broken packages?

Hi,

I don’t manage to upgrade my Kali template.
This is what I did and what I get…

Kali Template Installation & Update/upgrade

dom0

In dom0:

sudo qubes-dom0-update --enablerepo=qubes-templates-community-testing qubes-template-kali

NB: Everything went fine.

Kali

Then, in the newly installed Kali template, according to https://forum.qubes-os.org/t/kali-template-for-4-0-updated/3782/5:

sudo apt-mark hold qubes-*
sudo apt update && sudo apt upgrade
sudo apt-mark unhold qubes-*
sudo apt update && sudo apt upgrade
sudo apt-mark hold qubes-*

Problem: Kali throw an error when upgrading

“Automatic” Qubes Updater

I get an error and if I click to expand the details:

  Updating kali
  
  Error on updating kali: Command '['sudo', 'qubesctl', '--skip-dom0', '--targets=kali', '--show-output', 'state.sls', 'update.qubes-vm']' returned non-zero exit status 20.
  kali:
    ----------
              ID: update
        Function: pkg.uptodate
          Result: False
         Comment: Failed to get upgrades: Running scope as unit: run-rdcf8blahblahblah71b7.scope
                  E: Unable to correct problems, you have held broken packages.
         Started: 18:45:35.122903
        Duration: 4474.557 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: 18:45:39.599465
        Duration: 4274.483 ms
         Changes:   
                  ----------
                  pid:
                      1485
                  retcode:
                      0
                  stderr:
                  stdout:
    
    Summary for kali
    ------------
    Succeeded: 1 (changed=1)
    Failed:    1
    ------------
    Total states run:     2
    Total run time:   8.749 s

When trying to upgrade, on the Kali Template

The following packages have been kept back:
  default-mysql-server exfat-fuse kali-linux-headless libinput-bin libinput10 libpulse0 libpulsedsp libsemanage-common libwacom-bin libwacom-common mariadb-client-10.5 mariadb-client-core-10.5
  mariadb-server-10.5 mariadb-server-core-10.5 passwd php-common pulseaudio pulseaudio-qubes pulseaudio-utils qubes-gui-agent udisks2 xserver-xorg-core xserver-xorg-input-libinput xserver-xorg-input-qubes
  xserver-xorg-qubes-common xserver-xorg-video-amdgpu xserver-xorg-video-ati xserver-xorg-video-dummyqbs xserver-xorg-video-fbdev xserver-xorg-video-intel xserver-xorg-video-nouveau xserver-xorg-video-radeon
  xserver-xorg-video-vesa xserver-xorg-video-vmware

Question

What should I do to have my Kali template update seamlessly, either with Qubes’ built in Updater or manually in the template?

Thank you for your help! Much appreciated!!

AFAIK this is a dependency problem.
Have you tried apt-get --with-new-pkgs upgrade ?

From man apt :

Packages currently installed with new versions available are retrieved and upgraded;
under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed.

Thank you for your message!
Looks like so indeed.

Yes. Sorry, forgot to mention it!
So to be clear, I have just typed:

sudo apt update && sudo apt --with-new-pkgs upgrade
sudo apt-mark unhold qubes-*
sudo apt update && sudo apt --with-new-pkgs upgrade
sudo apt-mark hold qubes-*

No improvement to the situation. Same problem always there.

Looks like the problem comes from qubes-gui-agent because…

  1. If qubes-* are hold:

    ┌──(user㉿kali)-[~]
    └─$ sudo apt dist-upgrade 
    Reading package lists... Done
    [etc.]
    Calculating upgrade... Error!
    [etc.]
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     qubes-gui-agent : Depends: xserver-xorg-video-dummyqbs (= 4.1.18-1+deb11u1) but it is not going to be installed
                       Recommends: qt4-qtconfig but it is not installable
                       Recommends: pulseaudio-qubes but it is not going to be installed
     qubes-vm-recommended : Depends: pulseaudio-qubes but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
  2. And if qubes-* are unhold:

    sudo apt-mark unhold qubes-*
    sudo apt dist-upgrade
    

    apt says it will remove qubes-gui-agent and soon after the terminal vanishes.

    (Hopefully, we can clone the templates before testing!!)

Thanks again for your help! Much appreciated!!

apt full-upgrade ?
--no-install-recommends ?

Look why, maybe add them manually ? Check dependencies with apt-cache showpkg.
man apt-get has many solutions.
You can use --dry-run (even as user) to see what apt will do, w/o doing it.

Or, as the instructions are for 4.0, and you posted in 4.1, things have changed in the template.
But IMO, it looks like a standard Debian testing/Kali problem, nothing really Qubes related.

Whatever I tried:

  • either qubes-* are hold → Kali Template does not upgrade correctly
  • or qubes-* are unhold → qubes-gui-agent gets removed → The template gets unusable.

As @unman said:

Looks like exactly what happens to me now.

Therefore, is the only way simply to wait for the Qubes packages to support the new versions of the packages they depends on?

Thanks to all who provide help! Much appreciated!!

I think the best way to obtain an answer is to summon @unman here ^^
Meanwhile, you could install Kali as a standalone HVM.

Ten days have passed since I wrote this problem.
Problem still there.
I’d be grateful if someone had a hint to share…
Many thanks in advance!!

It doesn’t mean that someone don’t want to help you. On the contrary.

Thanks for your encouragements, Enmus!

Is there anybody on this forum who:

  • uses the Kali template for Qubes 4.1 and
  • gets a dependency problem between Qubes packages and Kali’s?

If so:

  • Did you find a way to solve this kind of problem or
  • Is waiting for new Qubes packages compatible with Kali’s the only solution?

Thanks for your attention and even more for your hints!

Hi,

More than a month that I struggle with that one.

Is there a way to solve the dependency problem between Qubes packages and Kali packages?

Or do we simply have to wait for the new Qubes packages compatible with Kali?

This problem looks like a follow-up to @unman 's solution in Kali template for 4.0 updated - #4 by unman

How to move forward?

Thanks again!
K.

I have the same situation. It’d great if this issue could be solved.

If I may, this is a summary of the situation now:

  • if I try to install python3 (sudo apt install python3) with qubes-* packages hold (sudo apt-mark hold qubes-*), the install cannot proceed:
The following packages have unmet dependencies:
 qubes-core-agent : Depends: python3-qubesdb but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
  • if I release the hold ( sudo apt-mark unhold qubes-* ) before installing python3, the qubes shutdown itself.

I use Kali for work and not being able to update python3 is really problematic as you can imagine…

I remember a post where @unman told the community that we should not wait too long and request help if we were not able to do something after trying diligently. I have this problem for weeks now. If I sum up everything, I have not spent hours but days trying to work around this problem.
English is not my native language. Maybe I asked something inadequately or something is inappropriate from my part? Please tell me.

Would it be possible to have a very short answer from a knowledgeable person? Like: “Dependencies problems are frequent between Qubes and Kali. There is nothing to do. Just wait for updated packages to arrive, which can take month in the worst case”.
I’d be so grateful because I could move on and drop Qubes (which I love!!!) when using Kali.

At that point, I’m desperate and anything apart from silence would be welcome!

Maybe it’s time to ask in a dedicated topic Kali to be removed from official repos since no one reported successfully updated it, at least on 4.1. I don’t see a point to be there in such a state.

I have the same issue, but with different packages.

Meanwhile, can you use it for work without updating it?

At this point, from my perspective, it is indeed completely unusable.

Nope. I constantly have to install too many different tools. And I cannot go on spending more time on Qubes/Kali issues than on my work itself.

I was struggling for nearly two months. To my deepest regrets because I love Qubes, I had to move on. At the end of the day, I have to deliver…

sudo apt-mark hold qubes-gui-agent && sudo apt update && sudo apt upgrade

Now I’m back and can use Kali every day. Don’t use traditional Update procedure from Qubes Manager.

I think I have a solution for this issue. I made a Kali template from debian-11 clone, switching repos to debian-12 (testing or something like that), adding kali repo keys and repos, install kali packages (as far as I remembeer I used kali-large metapackage).

For me, this worked (do this inside “faulty” kali template):

sudo apt update
sudo apt-mark unhold qubes-gui-agent
sudo apt reinstall qubes-gui-agent
sudo apt update
sudo apt upgrade

Note: If you did not previously hold the qubes-gui-agent with apt-mark, just skip that step.

This will reinstall qubes-gui-agent from deb11 repo to deb12 repository. After this I am able to update kali template as usually.

1 Like