오늘 아침에 작은 업데이트를 설치했지만 이제 apt가 트리거 처리를 중단했습니다. 갑자기 이런 문제가 왜 발생하는지 모르겠습니다.
$ sudo apt upgrade --autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
linux-image-5.10.0-10-amd64
The following packages will be upgraded:
libexpat1
1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B/98.5 kB of archives.
After this operation, 302 MB disk space will be freed.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 152993 files and directories currently installed.)
Removing linux-image-5.10.0-10-amd64 (5.10.84-1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.10.0-10-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-12-amd64
Found initrd image: /boot/initrd.img-5.10.0-12-amd64
Found linux image: /boot/vmlinuz-5.10.0-11-amd64
Found initrd image: /boot/initrd.img-5.10.0-11-amd64
done
(Reading database ... 148225 files and directories currently installed.)
Preparing to unpack .../libexpat1_2.2.10-2+deb11u3_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.10-2+deb11u3) over (2.2.10-2+deb11u2) ...
Setting up libexpat1:amd64 (2.2.10-2+deb11u3) ...
Processing triggers for libc-bin (2.31-13+deb11u2) ...
^C
시간 초과가 발생하지 않았으며 다시 설치하려고 했을 때 동일한 문제가 발생했습니다.
$ sudo apt install libexpat1 --reinstall
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/98.5 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 148225 files and directories currently installed.)
Preparing to unpack .../libexpat1_2.2.10-2+deb11u3_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.10-2+deb11u3) over (2.2.10-2+deb11u3) ...
Setting up libexpat1:amd64 (2.2.10-2+deb11u3) ...
Processing triggers for libc-bin (2.31-13+deb11u2) ...
^C
컬과 같은 작은 패키지가 같은 방식으로 다시 중단되더라도 여전히 제거하고 설치할 수 있습니다.
$ sudo apt remove curl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
curl
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 436 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 148225 files and directories currently installed.)
Removing curl (7.74.0-1.3+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
$ sudo apt install curl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/267 kB of archives.
After this operation, 436 kB of additional disk space will be used.
Selecting previously unselected package curl.
(Reading database ... 148217 files and directories currently installed.)
Preparing to unpack .../curl_7.74.0-1.3+deb11u1_amd64.deb ...
Unpacking curl (7.74.0-1.3+deb11u1) ...
Setting up curl (7.74.0-1.3+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
^C
$ curl --version
curl 7.74.0 (x86_64-pc-linux-gnu) libcurl/7.74.0 OpenSSL/1.1.1k zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
다음은 시스템에 대한 몇 가지 일반적인 정보입니다.
$ cat /etc/debian_version
11.2
$ apt --version
apt 2.2.4 (amd64)
$ uname -a
Linux <system> 5.10.0-12-amd64 #1 SMP Debian 5.10.103-1 (2022-03-07) x86_64 GNU/Linux
다음에 확인해야 할 사항에 대한 제안이 있으십니까?
답변1
pstree
해당 프로세스의 하위 프로세스를 사용 하고 확인하여 apt
중단된 재시작 필요 프로세스를 찾을 수 있었습니다 .
|-systemd-+-(sd-pam)
| |-apt---sh---needrestart
그러나 needrestart로 인해 시스템이 너무 심하게 정지되어 ps와 같은 일반 명령을 실행하여 PID를 가져와 종료할 수 없습니다. 큰 망치로 문제를 해결한 다음 전체 기계를 다시 시작했습니다.
재부팅 후 모든 명령이 예상대로 작동했으며 설치에 오류가 없는 것처럼 보였습니다. libexpat1도 --audit 명령에 의해 부분적으로 설치된 패키지로 나열되지 않습니다.
$ sudo dpkg --audit