x86_64-linux-gnu-readelf command not found

In this troubleshooting guide we learn how to fix x86_64-linux-gnu-readelf command not found error message

Introduction

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

x86_64-linux-gnu-readelf: command not found

or when using sudo you get the following error message

sudo: x86_64-linux-gnu-readelf: command not found

Solutions to x86_64-linux-gnu-readelf: command not found

How To Fix x86_64-linux-gnu-readelf: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu x86_64-linux-gnu-readelf is provided by binutils-multiarch package.

binutils-multiarch is:

The programs in this package are used to manipulate binary and object files that may have been created on other architectures. This package is primarily for multi-architecture developers and cross-compilers and is not needed by normal users or developers. Note that a cross-assembling version of gas is not included in this package, just the binary utilities.

NORMAL USERS SHOULD NOT INSTALL THIS PACKAGE. It’s meant only for those requiring support for reading info from binaries from other architectures.

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

sudo apt-get -y install binutils-multiarch

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

You can also use apt command to install binutils-multiarch.

sudo apt -y install binutils-multiarch

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

sudo aptitude install binutils-multiarch

Summary

In this tutorial we learn how to fix x86_64-linux-gnu-readelf command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.