corosync-keygen command not found

In this troubleshooting guide we learn how to fix corosync-keygen command not found error message

Introduction

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

corosync-keygen: command not found

or when using sudo you get the following error message

sudo: corosync-keygen: command not found

Solutions to corosync-keygen: command not found

How To Fix corosync-keygen: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu corosync-keygen is provided by corosync package.

corosync is:

The Corosync Cluster Engine is a Group Communication System with additional features for implementing high availability within applications. The project provides four C Application Programming Interface features:

  • A closed process group communication model with virtual synchrony guarantees for creating replicated state machines.
  • A simple availability manager that restarts the application process when it has failed.
  • A configuration and statistics in-memory database that provide the ability to set, retrieve, and receive change notifications of information.
  • A quorum system that notifies applications when quorum is achieved or lost.

This package contains the Corosync daemon and some administration tools.

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

sudo apt-get -y install corosync

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

You can also use apt command to install corosync.

sudo apt -y install corosync

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

sudo aptitude install corosync

Summary

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