hex2 command not found

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

Introduction

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

hex2: command not found

or when using sudo you get the following error message

sudo: hex2: command not found

Solutions to hex2: command not found

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

In Ubuntu hex2 is provided by mescc-tools package.

mescc-tools is:

The tools included provide very minimal functionality tools used in very early bootstrap of a toolchain.

blood-elf: generate ELF debug tables in M1-macro format from M1-macro assembly files

exec_enable: mark files as executable

get_machine: identify running hardware architecture

kaem: run shell scripts without a shell

hex2_linker: The trivially bootstrappable linker that is designed to be introspectable by humans and should you so desire assemble hex programs that you write.

M1-macro: The universal Macro assembler that can target any reasonable hardware architecture.

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

sudo apt-get -y install mescc-tools

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

You can also use apt command to install mescc-tools.

sudo apt -y install mescc-tools

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

sudo aptitude install mescc-tools

Summary

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