새 애플리케이션을 설치할 때 apt가 멈춥니다.

새 애플리케이션을 설치할 때 apt가 멈춥니다.

다음을 사용하여 새 패키지를 설치하려고 할 때 apt다음 apt-get오류 메시지가 나타납니다.

$ sudo apt install sl
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

그래서 저는 다음 지침을 따르고 있습니다.

$ dpkg --configure -a
dpkg: error: requested operation requires superuser privilege
$ sudo dpkg --configure -a
Setting up icaclient (13.10.0.20) ...

시간이 오래 걸리므로 잠시 후 Ctrl+C를 누르면 다음과 같은 결과가 나타납니다.

^Cdpkg: error processing package icaclient (--configure):
installed icaclient package post-installation script subprocess was interrupted
Errors were encountered while processing:
 icaclient

이제 패키지를 다시 설치하려고 하면 제대로 작동하는 것 같습니다.

$ sudo apt install sl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
sl is already the newest version (3.03-17build2).
The following packages were automatically installed and are no longer required:
  libllvm7 linux-headers-4.15.0-50 linux-image-4.15.0-50-generic linux-modules-4.15.0-50-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 398 not upgraded.
1 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 icaclient (13.10.0.20) ...

Progress: [  0%] 
[...................................................]

이제 다시 멈춰서 Ctrl+C를 누를 수 없습니다. 터미널 화면을 닫으면 게시글 처음부터 반복됩니다.

이 문제를 어떻게 해결할 수 있나요?

주의: 나는 매일 icaclient 애플리케이션을 사용하지만 아마도 다시 설치할 수 있을 것입니다.

답변1

위의 오류 메시지 중 하나에 명시된 대로 설치 후 스크립트에 걸려 있었습니다. 검색을 한 후 설치 후 스크립트가 다음 위치에 저장되어 있음을 발견했습니다./var/lib/dpkg/info/

따라서 다음을 사용하여 쉽게 문제를 해결할 수 있습니다.

sudo rm /var/lib/dpkg/info/icaclient.postinst

sudo dpkg --configure -a그 후 일부 잠금 파일을 실행하고 제거해야 했습니다 .

이제 apt가 제대로 작동하고 있습니다!

관련 정보