mockery command not found

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

Introduction

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

mockery: command not found

or when using sudo you get the following error message

sudo: mockery: command not found

Solutions to mockery: command not found

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

In Ubuntu mockery is provided by mockery package.

mockery is:

Mockery provides the ability to easily generate mocks for golang interfaces. It removes the boilerplate coding required to use mocks.

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

sudo apt-get -y install mockery

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

You can also use apt command to install mockery.

sudo apt -y install mockery

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

sudo aptitude install mockery

Summary

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