fence_legacy command not found

In this troubleshooting guide we learn how to fix fence_legacy command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

fence_legacy: command not found

or when using sudo you get the following error message

sudo: fence_legacy: command not found

Solutions to fence_legacy: command not found

How To Fix fence_legacy: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu fence_legacy is provided by pacemaker package.

pacemaker is:

At its core, Pacemaker is a distributed finite state machine capable of co-ordinating the startup and recovery of inter-related services across a set of machines.

Pacemaker understands many different resource types (OCF, SYSV, systemd) and can accurately model the relationships between them (colocation, ordering).

It can even use technology such as Docker to automatically isolate the resources managed by the cluster.

This package contains the Pacemaker daemons directly interacting with the cluster stack.

To fix this problem, we can install more using the command below.

sudo apt-get -y install pacemaker

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install pacemaker.

sudo apt -y install pacemaker

Or if you have aptitude installed you can use the following command.

sudo aptitude install pacemaker

Summary

In this tutorial we learn how to fix fence_legacy command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.