leak-analyze command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
leak-analyze: command not found
or when using sudo you get the following error message
sudo: leak-analyze: command not found
Solutions to leak-analyze: command not found
How To Fix leak-analyze: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu leak-analyze is provided by leaktracer package.
leaktracer is:
LeakTracer traces calls to new and delete, and reports inconsistencies in the C++-level memory-management.
It has limitations (eg. when you override the new and delete operators yourself), but is very easy to use (eg. compared to more complete tools like mpatrol), traces the C++ level (unlike most other tools), and gives pretty good results.
It uses gdb to display source-file information.
To fix this problem, we can install more using the command below.
sudo apt-get -y install leaktracer
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install leaktracer.
sudo apt -y install leaktracer
Or if you have aptitude installed you can use the following command.
sudo aptitude install leaktracer
Summary
In this tutorial we learn how to fix leak-analyze command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.