Score:0

Errors were encountered while processing: postfix E: Sub-process /usr/bin/dpkg returned an error code (1)

tc flag

After updating Ubuntu 18.04 to 20.04 to 21.04, i am facing this issue, neither able to install nor to uninstall packages.

[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
hr flag
It looks like your `/etc/postfix/main.cf` file has an error - similar to this one: [How to fix a postfix myhosting config problem?](https://stackoverflow.com/questions/56612459/how-to-fix-a-postfix-myhosting-config-problem). You will need to edit the file and fix the mistake.
Score:0
de flag
E: Sub-process /usr/bin/dpkg returned an error code (1)

The error message above might be due to a corrupt dpkg database or a corrupt package (postfix). Use the following commands to resolve. Open up a terminal to execute the commands.

Reconfigure the dpkg database use the command

sudo dpkg --configure -a

Fix the broken packages

sudo apt install--fix-broken

The above commands may resolve the issue. If not, try reinstalling the postfix after purging the old one. Purge the old one

sudo apt remove --purge postfix

Clean the old and unnecessary packages using the command

sudo apt clean
sudo apt autoremove

Update and upgrade the packages

sudo apt update
sudo apt upgrade

Reinstall the package

sudo apt-get install postfix
ॐkar avatar
tc flag
please, check my update question, it not working.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.