xmlpatch command not found

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

Introduction

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

xmlpatch: command not found

or when using sudo you get the following error message

sudo: xmlpatch: command not found

Solutions to xmlpatch: command not found

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

In Ubuntu xmlpatch is provided by xmldiff package.

xmldiff is:

xmldiff is a library and a command-line utility for making diffs out of XML. This may seem like something that doesn’t need a dedicated utility, but change detection in hierarchical data is very different from change detection in flat data. XML type formats are also not only used for computer readable data, it is also often used as a format for hierarchical data that can be rendered into human readable formats. A traditional diff on such a format would tell you line by line the differences, but that would not be readable by a human. xmldiff provides tools to make human readable diffs in those situations.

This package provides two possible commands: xmldiff and xmlpatch.

The diff algorithm is based on Change detection in hierarchically structured - information, by S. Chawathe, A. Rajaraman, H. Garcia-Molina and J. Widom, - Stanford University, 1996.

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

sudo apt-get -y install xmldiff

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

You can also use apt command to install xmldiff.

sudo apt -y install xmldiff

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

sudo aptitude install xmldiff

Summary

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