xmkmf command not found

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

Introduction

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

xmkmf: command not found

or when using sudo you get the following error message

sudo: xmkmf: command not found

Solutions to xmkmf: command not found

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

In Ubuntu xmkmf is provided by xutils-dev package.

xutils-dev is:

xutils-dev provides a set of utility programs shipped with the X Window System that do not require the X libraries; many of these programs are useful even on a system that does not have any X clients or X servers installed.

The programs in this package include:

  • imake, a C preprocessor interface to the make utility;
  • lndir, a tool that creates a shadow directory of symbolic links to another directory tree;
  • makedepend, a tool to create dependencies in makefiles;
  • makeg, a tool for making debuggable executables.

This package also contains xorg-macros.m4, a set of macros used in configure scripts of X.Org packages.

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

sudo apt-get -y install xutils-dev

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

You can also use apt command to install xutils-dev.

sudo apt -y install xutils-dev

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

sudo aptitude install xutils-dev

Summary

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