Cannot update because of masked packagekit

Hi, I tried updating KDE Neon system to 24.04.1, but when I try to do so it tells me this text wall:

localuser:root being added to access control list
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Unit packagekit.socket does not exist, proceeding anyway.
Created symlink /run/systemd/system/packagekit.socket → /dev/null.
Created symlink /run/systemd/system/packagekit.service → /dev/null.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
exitMainLoopMidFlight
Removed /run/systemd/system/packagekit.service.
Removed /run/systemd/system/packagekit.socket.

I tried somehow unmasking packagekit but it didn’t work, with or without restarting. What do I do?

From the errors it looks like something is really wrong in your system - XDG_RUNTIME_DIR is not supposed to be unset. Then it looks like do-release-upgrade crashes but couldn’t create a crash report, likely because it couldn’t access the correct directory.

Are you possibly trying to do the upgrade by logging in as the root user?

2 Likes

Sorry for being so long silent;

I am not sure, I don’t remember doing anything out of the ordinary.

Looks to me like trying to log into KDE desktop as root, maybe try to login as a normal user then do the update