yanglint command not found

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

Introduction

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

yanglint: command not found

or when using sudo you get the following error message

sudo: yanglint: command not found

Solutions to yanglint: command not found

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

In Ubuntu yanglint is provided by libyang2-tools package.

libyang2-tools is:

This package provides the “yanglint” and “yangre” tools which can be used during the creation of IETF YANG schemas. The tools are not generally useful for normal operation where libyang primarily processes configuration data, not schemas.

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

sudo apt-get -y install libyang2-tools

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

You can also use apt command to install libyang2-tools.

sudo apt -y install libyang2-tools

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

sudo aptitude install libyang2-tools

Summary

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