llvm-mca-12 command not found

In this troubleshooting guide we learn how to fix llvm-mca-12 command not found error message

Introduction

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

llvm-mca-12: command not found

or when using sudo you get the following error message

sudo: llvm-mca-12: command not found

Solutions to llvm-mca-12: command not found

How To Fix llvm-mca-12: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu llvm-mca-12 is provided by llvm-12 package.

llvm-12 is:

LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other compiler-related programs.

LLVM uses a single, language-independent virtual instruction set both as an offline code representation (to communicate code between compiler phases and to run-time systems) and as the compiler internal representation (to analyze and transform programs). This persistent code representation allows a common set of sophisticated compiler techniques to be applied at compile-time, link-time, install-time, run-time, or “idle-time” (between program runs).

The strengths of the LLVM infrastructure are its extremely simple design (which makes it easy to understand and use), source-language independence, powerful mid-level optimizer, automated compiler debugging support, extensibility, and its stability and reliability. LLVM is currently being used to host a wide variety of academic research projects and commercial projects. LLVM includes C and C++ front-ends, a front-end for a Forth-like language (Stacker), a young scheme front-end, and Java support is in development. LLVM can generate code for X96, SparcV10, PowerPC or many other architectures.

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

sudo apt-get -y install llvm-12

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

You can also use apt command to install llvm-12.

sudo apt -y install llvm-12

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

sudo aptitude install llvm-12

Summary

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