nettle-hash command not found

In this troubleshooting guide we learn how to fix nettle-hash command not found error message

Introduction

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

nettle-hash: command not found

or when using sudo you get the following error message

sudo: nettle-hash: command not found

Solutions to nettle-hash: command not found

How To Fix nettle-hash: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu nettle-hash is provided by nettle-bin package.

nettle-bin is:

Nettle is a cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, …), in applications like LSH or GNUPG, or even in kernel space.

It tries to solve a problem of providing a common set of cryptographic algorithms for higher-level applications by implementing a context-independent set of cryptographic algorithms. In that light, Nettle doesn’t do any memory allocation or I/O, it simply provides the cryptographic algorithms for the application to use in any environment and in any way it needs.

This package contains binary utilities that accompany the library:

- nettle-lfib-stream - generates a pseudo-random stream, using the Knuth
  lfib (non-cryptographic) pseudo-random generator.
- sexp-conv - conversion tool for handling the different flavours of sexp
  syntax.
- pkcs1-conv - converts PKCS#1 keys to sexp format.
- nettle-hash - command-line tool to compute message digests such as SHA-1.

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

sudo apt-get -y install nettle-bin

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

You can also use apt command to install nettle-bin.

sudo apt -y install nettle-bin

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

sudo aptitude install nettle-bin

Summary

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