一个月前,我升级到了Ubuntu22.04,这个过程显示了一些错误,但最终完成了。但从那以后,我一直无法运行sudo apt升级。它会产生错误,因为无法建立某个图标的备份链接。
每次我尝试sudo apt升级时,它都会显示出一个错误,类似于下面这个错误。(由于我尝试删除和重新安装aptdaemon-数据包,所以无法重现确切的错误)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
aptdaemon-data
0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
Need to get 0 B/159 kB of archives.
After this operation, 254 kB of additional disk space will be used.
(Reading database ... 366121 files and directories currently installed.)
Preparing to unpack .../aptdaemon-data_1.1.1+bzr982-0ubuntu39_all.deb ...
Unpacking aptdaemon-data (1.1.1+bzr982-0ubuntu39) ...
dpkg: error processing archive /var/cache/apt/archives/aptdaemon-data_1.1.1+bzr982-0ubuntu39_all.deb (--unpack):
unable to make backup link of './usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png' before installing new version: Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/aptdaemon-data_1.1.1+bzr982-0ubuntu39_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)我试过检查旗子,这就是它所显示的。
ls -ll /usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png
-rw-r--r-- 1 root 8296 1870 Nov 6 1927 /usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png不过,我试着运行chattr,但也不起作用
sudo chattr -ia /usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png
chattr: Operation not supported while setting flags on /usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png我从livecd卸载和引导,并运行fsck,这也没有显示任何错误。
我尝试以根用户身份运行sudo su,并在那里运行apt升级命令,这导致了同样的错误。
我试着移除起作用的aptdaemon数据包,但是后来我无法再次安装它。我尝试了sudo apt upgrade,这显示了一些包裹被拖住了。我运行了sudo apt dist-upgrade并安装了这些软件包。现在说我的系统是最新的。
现在,当我尝试安装aptdaemon-data包时,apt显示了上面的错误unable to make backup link of './usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png' before installing new version: Operation not permitted。
此时,我不知道该做什么,也不知道这个aptdaemon数据包是否重要,或者没有它是否可以继续。我不知道这是否会影响未来的更新。任何关于这方面的输入,或关于如何修复该错误的输入都将受到赞赏。
在我看来,图标dir中有一个文件是不能以任何方式删除或编辑的,即使我是根用户也是错误的。
编辑
运行lsattr /usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png给出
lsattr /usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png
-u---a-Ac---tTe------m /usr/share/icons/hicolor/24x24/status/aptdaemon-cleanup.png运行ls -al /usr/share/icons/hicolor/给出
total 208
drwxr-xr-x 29 root root 4096 Jun 28 07:55 .
drwxr-xr-x 20 root root 4096 Jun 24 23:21 ..
drwxr-xr-x 3 root root 4096 Jun 10 17:18 100x100
drwxr-xr-x 3 root root 4096 Jun 8 2021 1024x1024
drwxr-xr-x 15 root root 4096 Apr 20 2021 128x128
drwxr-xr-x 3 root root 4096 Apr 30 2021 150x150
drwxr-xr-x 3 root root 4096 Apr 30 2021 160x160
drwxr-xr-x 15 root root 4096 Jun 10 17:01 16x16
drwxr-xr-x 15 root root 4096 Apr 20 2021 192x192
drwxr-xr-x 3 root root 4096 Jun 8 2021 20x20
drwxr-xr-x 15 root root 4096 Jun 10 17:01 22x22
drwxr-xr-x 15 root root 4096 Nov 4 2021 24x24
drwxr-xr-x 15 root root 4096 Apr 20 2021 256x256
drwxr-xr-x 3 root root 4096 Jun 8 2021 28x28
drwxr-xr-x 3 root root 4096 Apr 30 2021 30x30
drwxr-xr-x 15 root root 4096 Jun 10 17:01 32x32
drwxr-xr-x 15 root root 4096 Apr 20 2021 36x36
drwxr-xr-x 3 root root 4096 Jun 8 2021 40x40
drwxr-xr-x 3 root root 4096 Apr 26 2021 42x42
drwxr-xr-x 3 root root 4096 Jun 8 2021 480x480
drwxr-xr-x 15 root root 4096 Nov 4 2021 48x48
drwxr-xr-x 3 root root 4096 Apr 30 2021 50x50
drwxr-xr-x 15 root root 4096 Apr 20 2021 512x512
drwxr-xr-x 15 root root 4096 Apr 20 2021 64x64
drwxr-xr-x 15 root root 4096 Apr 20 2021 72x72
drwxr-xr-x 3 root root 4096 Apr 26 2021 8x8
drwxr-xr-x 15 root root 4096 Apr 20 2021 96x96
-rw-r--r-- 1 root root 34992 Jun 28 07:55 icon-theme.cache
-rw-r--r-- 1 root root 55507 Mar 19 2018 index.theme
drwxr-xr-x 15 root root 4096 Apr 25 2021 scalable
drwxr-xr-x 3 root root 4096 Jun 10 17:01 symbolic发布于 2022-06-25 01:16:37
那是S罕见的。嗯嗯。您是否第一次尝试了sudo apt-get install -f和sudo apt update,并尝试了sudo apt upgrade来sudo apt dist-upgrade或下载.deb文件。aptdaemon .deb查看发生了什么!
https://askubuntu.com/questions/1415680
复制相似问题