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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel