splitpatch command not found

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

Introduction

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

splitpatch: command not found

or when using sudo you get the following error message

sudo: splitpatch: command not found

Solutions to splitpatch: command not found

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

In Ubuntu splitpatch is provided by splitpatch package.

splitpatch is:

Divide a patch or diff file into pieces. The split can made by file or by hunk basis. This makes is possible to separate changes that might not be desirable or assemble the patch into more coherent set of changes.

The hunk option opens up possibility to compare similar patches hunk-by-hunk using tool like interdiff(1) from patchutils package. Operating on hunk level also gives more control, similar to Git, to selectively shelve in changes e.g. to Version Control repository.

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

sudo apt-get -y install splitpatch

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

You can also use apt command to install splitpatch.

sudo apt -y install splitpatch

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

sudo aptitude install splitpatch

Summary

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