This issue occurs when the problem is with the package installer. The package installer is an application that tracks software updates and dependencies. So, Ubuntu sub-process /usr/bin/dpkg would return the error while updating and upgrading the system. we can also fix the ubuntu sub-process returned an error.
There was an issue with mono software installed for Microsoft .net framework. This is an open-source software from Microsoft for Linux based operating systems. Whenever I try to update or upgrade our Ubuntu machine it gets the error.
When you face the sub-process returned an error in ubuntu. we have to check the DPKG database. we can also check the integrity of the DPKG database using the below commands.
sudo dkpg -V
The above command will check the integrity of the packets by comparing the metadata stored in its database file and file paths. you can also use sudo dpkg –verify command.
Ubuntu Sub-process /usr/bin/dpkg returned an error code (1):
We can fix the ubuntu sub-process issue when you’re trying to update the system using sudo apt update command.
So I try to find an error in the Ubuntu and after doing that I got that I removed the mono software from my machine but it was not fully removed.
There’re many ways to solve this issue and I’m gonna show them.
Method 1: try to rebuild the database
sudo dpkg --configure -a
Method 2: you can use the below command to remove corrupted software if you’re not able to find it.
sudo apt autoremove
Method 3: you can force your machine to fix the issue forcefully.
sudo apt install -f
Method 4: you can use the purge command to remove it completely from the machine.
sudo apt --purge remove unattended-upgrades
here unattended-upgrades is “error processing the package name” you can replace it with your error processing package name. so
sudo apt auto-remove sudo apt update
After choosing method 2 my error was gone and it’s worked for me.