umockdev-run command not found

In this troubleshooting guide we learn how to fix umockdev-run command not found error message

Introduction

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

umockdev-run: command not found

or when using sudo you get the following error message

sudo: umockdev-run: command not found

Solutions to umockdev-run: command not found

How To Fix umockdev-run: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu umockdev-run is provided by umockdev package.

umockdev is:

umockdev mocks hardware devices for creating unit tests for libraries and programs that handle Linux hardware devices.

This package provides tools to record the properties and behaviour of particular devices, and to run a program or test suite under a test bed with the previously recorded devices loaded.

Right now this covers sysfs, uevents, basic support for /dev devices, and recording/mocking usbdevfs ioctls (for PtP/MTP devices).

With this you can simulate particular hardware in virtual environments up to some degree, without needing any particular privileges or disturbing the whole system.

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

sudo apt-get -y install umockdev

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

You can also use apt command to install umockdev.

sudo apt -y install umockdev

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

sudo aptitude install umockdev

Summary

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