wayland-scanner command not found

In this troubleshooting guide we learn how to fix wayland-scanner command not found error message

Introduction

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

wayland-scanner: command not found

or when using sudo you get the following error message

sudo: wayland-scanner: command not found

Solutions to wayland-scanner: command not found

How To Fix wayland-scanner: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu wayland-scanner is provided by libwayland-bin package.

libwayland-bin is:

Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol. The compositor can be a standalone display server running on Linux kernel modesetting and evdev input devices, an X application, or a wayland client itself. The clients can be traditional applications, X servers (rootless or fullscreen) or other display servers.

This package contains the development binary utilities

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

sudo apt-get -y install libwayland-bin

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

You can also use apt command to install libwayland-bin.

sudo apt -y install libwayland-bin

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

sudo aptitude install libwayland-bin

Summary

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