xml2-config command not found

In this troubleshooting guide we learn how to fix xml2-config command not found error message

Introduction

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

xml2-config: command not found

or when using sudo you get the following error message

sudo: xml2-config: command not found

Solutions to xml2-config: command not found

How To Fix xml2-config: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu xml2-config is provided by libxml2-dev package.

libxml2-dev is:

XML is a metalanguage to let you design your own markup language. A regular markup language defines a way to describe information in a certain class of documents (eg HTML). XML lets you define your own customized markup languages for many classes of document. It can do this because it’s written in SGML, the international standard metalanguage for markup languages.

Install this package if you wish to develop your own programs using the GNOME XML library.

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

sudo apt-get -y install libxml2-dev

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

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

sudo apt -y install libxml2-dev

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

sudo aptitude install libxml2-dev

Summary

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