pchrt command not found

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

Introduction

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

pchrt: command not found

or when using sudo you get the following error message

sudo: pchrt: command not found

Solutions to pchrt: command not found

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

In Ubuntu pchrt is provided by python3-schedutils package.

python3-schedutils is:

Python interface for the Linux scheduler sched_{get,set}{affinity,scheduler} functions and friends.

The scheduler is the kernel component that decides which runnable thread will be executed by the CPU next. Each thread has an associated scheduling policy and static scheduler priority, sched_priority. The scheduler makes its decisions based on knowledge of the scheduling policy and static priority of all threads on the system. This package provides Python bindings to get and set the scheduler’s knowledge.

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

sudo apt-get -y install python3-schedutils

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

You can also use apt command to install python3-schedutils.

sudo apt -y install python3-schedutils

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

sudo aptitude install python3-schedutils

Summary

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