"dpkg: unrecoverable fatal error" when trying to update monitoring agent


I’m following the guide to upgrade the monitoring agent

However when I run

sudo apt-get purge do-agent

I get

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

I run the command as instructed and then re-run the first command but that results in

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
The following packages will be REMOVED:
  do-agent* letsencrypt
The following packages will be upgraded:
1 upgraded, 0 newly installed, 2 to remove and 213 not upgraded.
3 not fully installed or removed.
Need to get 0 B/10.2 MB of archives.
After this operation, 63.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 870640 files and directories currently installed.)
Removing letsencrypt (0.19.0-1+ubuntu16.04.1+certbot+1) ...
dpkg: unrecoverable fatal error, aborting:
 fork failed: Cannot allocate memory
E: Sub-process /usr/bin/dpkg returned an error code (2)

Can anyone help?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If anyone comes across this thread I managed to resolve the issue with debconf-i18n by doing apt-get install --reinstall debconf-i18n

Hi @KDSys,

Sorry for the long delay in getting back to you. Unfortunately we’re still in the same situation after adding those additional sources:

dpkg: error processing package debconf-i18n (--configure):
 package debconf-i18n is not ready for configuration
 cannot configure (current status 'half-installed')
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

@KDSys unfortunately the dry-run gives us another error:

dpkg: dependency problems prevent removal of debconf-i18n:
 ubuntu-minimal depends on debconf-i18n.

dpkg: error processing package debconf-i18n (--remove):
 dependency problems - not removing
Errors were encountered while processing: