haproxy command not found

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

Introduction

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

haproxy: command not found

or when using sudo you get the following error message

sudo: haproxy: command not found

Solutions to haproxy: command not found

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

In Ubuntu haproxy is provided by haproxy package.

haproxy is:

HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. It features connection persistence through HTTP cookies, load balancing, header addition, modification, deletion both ways. It has request blocking capabilities and provides interface to display server status.

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

sudo apt-get -y install haproxy

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

You can also use apt command to install haproxy.

sudo apt -y install haproxy

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

sudo aptitude install haproxy

Summary

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