我最近注意到我的系统中存在一些问题:
1. 当我尝试从“Ubuntu 软件”安装任何内容时,出现错误“无法安装...:您无权安装软件”
2. 当我在用户设置中按“解锁”时,什么也没发生。
我很确定,这两个问题都是相关的。这些对我来说都不是很重要(apt 和 useradd 工作正常)。
以前通过 GUI 安装软件是可行的,所以我很确定,是更新或我安装的某些包导致了问题。
编辑:
我在上述情况下在 journalctl 中发现了此输出:
maj 24 23:33:21 tfrankowski-UX32LN kernel: polkitd[6183]: segfault at 8 ip 00007f91635cbfa6 sp 00007ffdccb6c790 error 4 in libpolkit-backend-1.so.0.0.0[7f91635bc000+18000]
maj 24 23:33:21 tfrankowski-UX32LN systemd[1]: polkit.service: Main process exited, code=dumped, status=11/SEGV
maj 24 23:33:21 tfrankowski-UX32LN systemd[1]: polkit.service: Failed with result 'core-dump'.
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1163]: PolicyKit daemon disconnected from the bus.
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1163]: We are no longer a registered authentication agent.
maj 24 23:33:21 tfrankowski-UX32LN dbus-daemon[1044]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service' requested by ':1.12' (uid=0 pid=1048 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
maj 24 23:33:21 tfrankowski-UX32LN gnome-control-c[2116]: Error acquiring permission: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1740]: PolicyKit daemon disconnected from the bus.
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1740]: We are no longer a registered authentication agent.
maj 24 23:33:21 tfrankowski-UX32LN systemd[1]: Starting Authorization Manager...
maj 24 23:33:21 tfrankowski-UX32LN polkitd[6411]: started daemon version 0.105 using authority implementation `local' version `0.105'
maj 24 23:33:21 tfrankowski-UX32LN dbus-daemon[1044]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
maj 24 23:33:21 tfrankowski-UX32LN systemd[1]: Started Authorization Manager.
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1163]: PolicyKit daemon reconnected to bus.
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1163]: Attempting to re-register as an authentication agent.
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1740]: PolicyKit daemon reconnected to bus.
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1740]: Attempting to re-register as an authentication agent.
maj 24 23:33:21 tfrankowski-UX32LN polkitd(authority=local)[6411]: Registered Authentication Agent for unix-session:c1 (system bus name :1.28 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1163]: We are now a registered authentication agent.
maj 24 23:33:21 tfrankowski-UX32LN polkitd(authority=local)[6411]: Registered Authentication Agent for unix-session:2 (system bus name :1.76 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
maj 24 23:33:21 tfrankowski-UX32LN org.gnome.Shell.desktop[1740]: We are now a registered authentication agent.
答案1
问题似乎与这个文件有关
/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
它源于手动 xRDP 安装(参见评论部分)或 x2go 或其他远程桌面应用程序。
这解决方案来自同一网站:
删除 02-allow-colord.conf
sudo rm /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
创建 45-allow-colord.pkla:
sudo vi /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
内容:
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
然后
sudo systemctl restart polkit.service