hachoir-urwid command not found

In this troubleshooting guide we learn how to fix hachoir-urwid command not found error message

Introduction

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

hachoir-urwid: command not found

or when using sudo you get the following error message

sudo: hachoir-urwid: command not found

Solutions to hachoir-urwid: command not found

How To Fix hachoir-urwid: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu hachoir-urwid is provided by hachoir package.

hachoir is:

Hachoir is a Python library used to represent of a binary file as a tree of Python objects. Each object has a type, a value, an address, etc. The goal is to be able to know the meaning of each bit in a file.

Why using slow Python code instead of fast hardcoded C code? Hachoir has many interesting features:

  • Autofix: Hachoir is able to open invalid / truncated files
  • Lazy: Open a file is very fast since no information is read from file, data are read and/or computed when the user ask for it
  • Types: Hachoir has many predefined field types (integer, bit, string, etc.) and supports string with charset (ISO-8859-1, UTF-8, UTF-16, …)
  • Addresses and sizes are stored in bit, so flags are stored as classic fields
  • Endian: You have to set endian once, and then number are converted in the right endian
  • Editor: Using Hachoir representation of data, you can edit, insert, remove data and then save in a new file.

Hachoir provides command-line tools using its parsers:

  • hachoir-grep: find a text pattern in a binary file
  • hachoir-metadata: get metadata from binary files
  • hachoir-strip: modify a file to remove metadata
  • hachoir-urwid: display the content of a binary file in text mode
  • hachoir-wx: display the content of a binary file in a GUI

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

sudo apt-get -y install hachoir

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

You can also use apt command to install hachoir.

sudo apt -y install hachoir

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

sudo aptitude install hachoir

Summary

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