处理时遇到错误:/var/cache/apt/archives/passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb

处理时遇到错误:/var/cache/apt/archives/passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb

从 18.04 迁移到 20.04 后以及通过以下方式更新期间

sudo apt-get update && sudo apt-get upgrade

被跟踪

Preparing to unpack .../passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb ...
Unpacking passwd (1:4.8.1-1ubuntu5.20.04) over (1:4.5-1ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb (--unpack):
 unable to make backup link of './usr/bin/passwd' before installing new version: Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Reinstalling /etc/cron.daily/passwd that was moved away
Errors were encountered while processing:
 /var/cache/apt/archives/passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

尝试使用以下所有命令:

sudo apt-get update

结果

Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [894 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [448 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [208 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [264 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [758 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [561 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [160 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [303 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2 468 B]
Get:14 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1 768 B]
Get:15 http://archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24,3 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [58,3 kB]
Fetched 4 006 kB in 1s (3 331 kB/s)                                   

(appstreamcli:5770): GLib-CRITICAL **: 08:39:45.901: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
Reading package lists... Done

sudo dpkg --configure -a

sudo apt-get install -f

sudo apt-get install --fix-broken

sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

结果总是一样的

Preparing to unpack .../passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb ...
Unpacking passwd (1:4.8.1-1ubuntu5.20.04) over (1:4.5-1ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb (--unpack):
 unable to make backup link of './usr/bin/passwd' before installing new version: Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Reinstalling /etc/cron.daily/passwd that was moved away
Errors were encountered while processing:
 /var/cache/apt/archives/passwd_1%3a4.8.1-1ubuntu5.20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

也许不是因为我的一个分区被加密了,但无论如何,如果你知道解决方案,请告诉我,谢谢

相关内容