Возникли ошибки при обработке: postfix E: Sub-process /usr/bin/dpkg returned an error code (1)

После обновления Ubuntu 18.04 с 20.04 до 21.04 я столкнулся с этой проблемой, не могу ни установить, ни удалить пакеты.

[sudo] password for commaderwolfer: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
git is already the newest version (1:2.32.0-1~ppa0~ubuntu18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 14 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 postfix (3.5.6-1) ...

Postfix (main.cf) 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 'systemctl reload postfix'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: CommanderWolfer..
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: CommanderWolfer..
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)```

after running sudo dpkg --configure -a

sudo dpkg --configure -a
Setting up postfix (3.5.6-1) ...

Postfix (main.cf) 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 'systemctl reload postfix'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: CommanderWolfer..
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: CommanderWolfer..
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Errors were encountered while processing:
 postfix
0
задан 8 August 2021 в 16:50

1 ответ

E: Sub-process /usr/bin/dpkg returned an error code (1)

Сообщение об ошибке выше может быть вызвано повреждением базы данных dpkg или повреждением пакета (postfix). Для решения проблемы используйте следующие команды. Откройте терминал для выполнения команд.

Переконфигурируйте базу данных dpkg с помощью команды

sudo dpkg --configure -a

Исправьте поврежденные пакеты

sudo apt install--fix-broken

Приведенные выше команды могут решить проблему. Если нет, попробуйте переустановить postfix после очистки старого. Очистите старый

sudo apt remove --purge postfix

Очистите старые и ненужные пакеты с помощью команды

sudo apt clean
sudo apt autoremove

Обновите пакеты

sudo apt update
sudo apt upgrade

Переустановите пакет

sudo apt-get install postfix
0
ответ дан 20 August 2021 в 10:28

Другие вопросы по тегам:

Похожие вопросы: