나는 실행 중이었고 mc
쉘에 컬과 포스트픽스를 설치하려고 했습니다 apt-get install curl postfix
. postfix에 대한 구성 대화 상자가 나타났고 Ctrl-o(MC 표시/숨기기 전환)를 두 번 누른 후에 구성 메시지를 더 이상 읽을 수 없어서 F10을 눌러 MC를 종료했습니다. apt-get 프로세스는 여전히 존재했고 sudo kill xxxx
. 이제 apt-get이 작동하지 않습니다.
난 노력 했어apt-get -f install
X@X ~ % LC_ALL=C sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
exim4-config lsb-invalid-mta
The following packages will be REMOVED:
postfix
The following NEW packages will be installed:
exim4-config lsb-invalid-mta
0 upgraded, 2 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0 B/523 kB of archives.
After this operation, 2462 kB disk space will be freed.
Do you want to continue? [Y/n]
Preconfiguring packages ...
dpkg: postfix: dependency problems, but removing anyway as you requested:
lsb-core depends on lsb-invalid-mta (>= 4.1+Debian13+nmu1) | mail-transport-agent; however:
Package lsb-invalid-mta is not installed.
Package mail-transport-agent is not installed.
Package postfix which provides mail-transport-agent is to be removed.
Package exim4-daemon-light which provides mail-transport-agent is not installed.
bsd-mailx depends on default-mta | mail-transport-agent; however:
Package default-mta is not installed.
Package exim4-daemon-light which provides default-mta is not installed.
Package mail-transport-agent is not installed.
Package postfix which provides mail-transport-agent is to be removed.
Package exim4-daemon-light which provides mail-transport-agent is not installed.
(Reading database ... 421170 files and directories currently installed.)
Removing postfix (2.11.3-1) ...
dpkg: error processing package postfix (--remove):
subprocess installed pre-removal script returned error exit status 102
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
그리고 다양한 질문에 제시된 기타 솔루션(1분기,2분기,3분기): apt-get purge postfix
, apt-get --reinstall install postfix
, dpkg --pending --configure
.
정말 비슷한 질문(중복?)은 다음과 같습니다.접미사 오류, 그러나 대답이 없습니다.
패키지 관리자를 어떻게 수정할 수 있나요? 내 OS는 Debian Jessie입니다.
편집 1
Bahamut의 제안은 오류 코드 102로 인해 실패합니다.
X@X ~ % LC_ALL=C sudo dpkg --install /var/cache/apt/archives/postfix_2.11.3-1_amd64.deb
Selecting previously unselected package postfix.
(Reading database ... 421172 files and directories currently installed.)
Preparing to unpack .../postfix_2.11.3-1_amd64.deb ...
dpkg: warning: subprocess old pre-removal script returned error exit status 102
dpkg: trying script from the new package instead ...
dpkg: ... it looks like that went OK
Unpacking postfix (2.11.3-1) over (2.11.3-1) ...
Setting up postfix (2.11.3-1) ...
insserv: script postfix is not an executable regular file, skipped!
Postfix configuration was not changed. If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).
After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.
Running newaliases
dpkg: error processing package postfix (--install):
subprocess installed post-installation script returned error exit status 102
Processing triggers for systemd (215-17+deb8u5) ...
Processing triggers for ufw (0.33-2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for libc-bin (2.19-18+deb8u6) ...
Errors were encountered while processing:
postfix
답변1
구성 파일을 수동으로 제거하면 다음과 같이 작동합니다.
rm /var/lib/dpkg/info/postfix.*
apt-get purge postfix
답변2
시도하고 dpkg --install /var/cache/apt/archives/postfix_2.11.3-1_amd64.deb
그 후에apt -f install