Question

How do I avoid "'/usr/bin/aptitude safe-upgrade' failed: FATAL -> Failed to fork"?

I have an Ubuntu 14.04 droplet which I set up with Ansible. When I run my playbook it currently fails when trying to upgrade APT packages:

'/usr/bin/aptitude safe-upgrade' failed: FATAL -> Failed to fork.

I’m not sure what this means or how to get round it.

The playbook’s worked fine plenty of times before on this droplet. My droplet was recently migrated as part of some DO improvement and this is the first time I’ve run the playbook since then.


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.

Accepted Answer

@philgyford

That message generally means there’s not enough RAM available for the process to continue to run. I’ve seen it before, though it’s been a while.

In such a case, the Droplet may simply need more RAM. One way to test this would be to reboot the Droplet (so all RAM is freed up), then run the playbook. If you still see the error, try upgrading just the CPU and RAM (since you can’t just upgrade RAM right now) to the next highest.

You’ll have to shut down the Droplet, then navigate to:

DigitalOcean CP -> Droplet -> Resize

Choose CPU and RAM Only, select the next plan, and click Resize. It’ll take a few seconds to a minute to finish up. Once done, power on the Droplet and run the playbook again.

You can check the free RAM on your Droplet using free -mh

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.