我正在运行以下命令:sudo apt upgrade
并弹出以下错误:
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up policykit-1 (0.105-31+deb11u1) ...
chown: cannot access '/usr/libexec/polkit-agent-helper-1': No such file or direc
tory
dpkg: error processing package policykit-1 (--configure):
installed policykit-1 package post-installation script subprocess returned erro
r exit status 1
dpkg: dependency problems prevent configuration of gdm3:
gdm3 depends on policykit-1 (>= 0.105-5~); however:
Package policykit-1 is not configured yet.
dpkg: error processing package gdm3 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of packagekit:
packagekit depends on policykit-1; however:
Package policykit-1 is not configured yet.
dpkg: error processing package packagekit (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of packagekit-tools:
packagekit-tools depends on packagekit (= 1.2.2-2); however:
Package packagekit is not configured yet.
dpkg: error processing package packagekit-tools (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gstreamer1.0-packagekit:
gstreamer1.0-packagekit depends on packagekit (= 1.2.2-2); however:
Package packagekit is not configured yet.
dpkg: error processing package gstreamer1.0-packagekit (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
policykit-1
gdm3
packagekit
packagekit-tools
gstreamer1.0-packagekit
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试之后sudo aptitude install -f
,出现如下错误:
The following packages will be REINSTALLED:
gstreamer1.0-packagekit packagekit packagekit-tools policykit-1
The following partially installed packages will be configured:
gdm3
0 packages upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
E: Internal Error, No file name for policykit-1:amd64
我需要您的帮助,因为每当我使用 apt/aptitude 命令时都会弹出这个错误。