2

When we try to install, remove, update mailutils we always have same error with status 'half-installed'. Can help me? The output of:

sudo apt install mailutils

is:

Reading package lists... Done 
Building dependency tree        
Reading state information... Done 
mailutils is already the newest version (1:2.99.99-1ubuntu2). 
0 upgraded, 0 newly installed, 0 to remove and 136 not upgraded. 1 not fully installed or removed. 
Need to get 0 B/90.4 kB of archives. After this operation, 0 B of additional disk space will be used. 
Do you want to continue? [Y/n] y 
dpkg: error processing package patch (--configure):  package patch is not ready for configuration  cannot configure (current status 'half-installed') 
Errors were encountered while processing:  patch 
E: Sub-process /usr/bin/dpkg returned an error code (1)
NerdOfLinux
  • 3,728
  • 7
  • 29
  • 55

1 Answers1

0

In this case, I would try the following to attempt a repair:
First, try using apt itself to repair the package.

sudo apt install -f

Then, try re-installing the package:

sudo apt install --reinstall mailutils

If this fails, the next step is to go one level below apt, and use dpkg:

sudo dpkg --configure -a

If all else fails, try removing with apt, and then re-installing:

sudo apt purge mailutils

and be sure to back up any configs you want to keep, just in case.

If even that doesn't work, try dpkg again:

sudo dpkg --remove mailutils

followed by apt:

sudo apt install mailutils

Should that not work, you may have a corrupted .deb file cached, or a broken dependency so run:

sudo apt clean
sudo apt autoclean
sudo apt autoremove

and then re-start all the steps.

NerdOfLinux
  • 3,728
  • 7
  • 29
  • 55