heaptrack command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
heaptrack: command not found
or when using sudo you get the following error message
sudo: heaptrack: command not found
Solutions to heaptrack: command not found
How To Fix heaptrack: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu heaptrack is provided by heaptrack package.
heaptrack is:
Heap memory usage profiler. It uses LD_PRELOAD to track all calls to the core memory allocation functions and logs these occurrences. Additionally, backtraces are obtained and logged. It can also generate a historigram of allocation sizes over the number of calls. Heaptrack measures the following:
- Heap memory consumption (like Massif).
- Number of calls to allocation functions (like callgrind).
- Total amount of memory allocated, ignoring deallocations.
- Leaked memory (like memcheck).
Heaptrack is notable for it’s ability to attach to running processes, for consuming substantially less memory than Valgrind, and for not reducing an application’s interactivity as much as Valgrind does. Heaptrack is useful for debugging memory leaks and memory ballooning.
The package contains the command line tools.
To fix this problem, we can install more using the command below.
sudo apt-get -y install heaptrack
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install heaptrack.
sudo apt -y install heaptrack
Or if you have aptitude installed you can use the following command.
sudo aptitude install heaptrack
Summary
In this tutorial we learn how to fix heaptrack command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.