제거 후 Dovecot-imapd가 제대로 설치되지 않습니다.

제거 후 Dovecot-imapd가 제대로 설치되지 않습니다.

나는 창업을 위한 전자 메일을 제공하기 위해 비둘기장/접미사 서버를 작동시키려고 노력해 왔으며, 나 역시 잘못 작성되고 오래된 가이드의 희생양이 되었습니다.

처음에는 Postfix와 Dovecot을 설치하고 모든 것을 직접 구성하겠다고 생각하여 빈 구성을 선택했습니다. 어떤 시점에서 나는 내가 실제로 하고 있던 일과 내가 구성한 일을 잊어버렸기 때문에 apt-purge내가 설치한 모든 패키지를 사용하기로 결정하고 다시 시작했습니다.

을 사용하여 dovecot을 설치하려고 시도한 후 sudo apt-get install dovecot-imapd다음 오류가 발생합니다.

The following NEW packages will be installed:
  dovecot-imapd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/425 kB of archives.
After this operation, 565 kB of additional disk space will be used.
Selecting previously unselected package dovecot-imapd.
(Reading database ... 23009 files and directories currently installed.)
Unpacking dovecot-imapd (from .../dovecot-imapd_1%3a2.1.7-7_amd64.deb) ...
Setting up dovecot-imapd (1:2.1.7-7) ...

Creating config file /etc/dovecot/conf.d/20-imap.conf with new version
cp: cannot create regular file `/etc/dovecot/conf.d/20-imap.conf': No such file or directory
dpkg: error processing dovecot-imapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dovecot-imapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

, 나는 dir /etc/dovecot 폴더를 볼 수 없으며, 777을 사용하여 수동으로 생성 mkdir하고 777로 chmod하면 20-imap.conf가 존재하지 않으며 일반 파일을 생성할 수 없다는 오류가 계속 발생합니다.

여기에는 아이디어가 없습니다. 여러분이 저에게 줄 수 있는 도움을 주시면 대단히 감사하겠습니다!

감사해요!

답변1

제거 dovecot-common하고 다시 시도하시겠습니까? 실행하여 dpkg --get-selections | grep dovecot모든 dovecot 패키지가 제거되었는지 확인하십시오. dpkg -P packagename, 이미 제거했지만 파일을 제거하지 않은 경우.

모든 dovecot 패키지가 사라진 것을 확인한 후에는 /etc/dovecot수동으로 만들려고 했던 디렉터리를 삭제했는지 확인하세요.

/etc/dovecot, 및 는 패키지 /etc/dovecot/conf.d에 속합니다 dovecot-common. dovecot-imapd 패키지만 삭제해도 해당 디렉터리는 삭제되지 않습니다. 수동으로 제거했거나 다른 이상한 일이 발생한 것 같습니다.

답변2

    apt-get purge....

    based on dpkg --get-selections | grep dovecot (which was a life saver) the output should be:
    dovecot-core     install(those 2 remain no matter what one is using aptitude or apt)
    then run:
    type dovecot
    dovecot is /usr/sbin/dovecot
    rm /usr/sbin/dovecot
    rm -r /etc/dovecot
    dpkg -P 'dovecot-core'(ignore warnings)and dont forget the ''.

    After this do a clean install.

관련 정보