triehash command not found

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

Introduction

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

triehash: command not found

or when using sudo you get the following error message

sudo: triehash: command not found

Solutions to triehash: command not found

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

In Ubuntu triehash is provided by triehash package.

triehash is:

TrieHash generates perfect hash functions as C code which then gets compiled into optimal machine code as part of the usual program compilation.

TrieHash works by translating a list of strings to a trie, and then converting the trie to a set of recursive switch statements; first switching by length, and then switching by bytes.

TrieHash has various optimizations such as processing multiple bytes at once (on GNU C), and shortcuts for reducing the complexity of case-insensitive matching (ASCII only). Generated code performs substantially faster than gperf, but is larger.

TrieHash was written for use in APT.

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

sudo apt-get -y install triehash

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

You can also use apt command to install triehash.

sudo apt -y install triehash

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

sudo aptitude install triehash

Summary

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