最近显示 dovecot 需要更新。没问题...
除了它会发出这个错误:/usr/bin/ucfr: 第 323 行:[: : 预期整数表达式
然后自己崩溃了。所以我想了一会儿……也许这是一个老冲突,我们已经升级了几次。我运行 iredmail,让我们备份我们的配置并刷新它,重建它,然后我只需区分更改即可。
我无法删除该文件:
Purging configuration files for dovecot-core (1:2.2.22-1ubuntu2.1) ...
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 56: [: : integer expression expected
ucfr: Association belongs to , not dovecot-core
ucfr: Aborting
dpkg: error processing package dovecot-core (--purge):
subprocess installed post-removal script returned error exit status 5
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing..
因此我进入 /var/lib/dpkg/info 目录并阅读有关删除的信息。我进一步删除了能找到的所有内容。我相信此时我已经拥有了一切。我返回重新安装核心,然后我们得到了:
The following NEW packages will be installed:
dovecot-core
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,420 kB of archives.
After this operation, 7,578 kB of additional disk space will be used.
Selecting previously unselected package dovecot-core.
(Reading database ... 177431 files and directories currently installed.)
Preparing to unpack .../dovecot-core_1%3a2.2.22-1ubuntu2.1_amd64.deb ...
Unpacking dovecot-core (1:2.2.22-1ubuntu2.1) ...
Processing triggers for systemd (229-4ubuntu10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up dovecot-core (1:2.2.22-1ubuntu2.1) ...
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
Creating config file /etc/dovecot/conf.d/10-master.conf with new version
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 56: [: : integer expression expected
ucfr: Association belongs to , not dovecot-core
ucfr: Aborting
dpkg: error processing package dovecot-core (--configure):
subprocess installed post-installation script returned error exit status 5
Processing triggers for systemd (229-4ubuntu10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
dovecot-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
我找遍了所有地方,却找不到处理这个问题的参考资料。我非常迷茫,现在我的鸽舍已经完全坏了。
在我弄清楚我的最后一次备份和回滚之前,有人有什么想法吗?
答案1
看起来像是 中的一个错误/usr/bin/ucfr
。作为一种解决方法,您可以ucfr
从 中删除调用/var/lib/dpkg/info/dovecot-core.postrm
:
在第 19 行更改
ucfr --purge dovecot-core $conffile
到
true ucfr --purge dovecot-core $conffile
然后运行
sudo apt-get purge dovecot-core
如果有效,请重新安装dovecot-core