cg_diff command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
cg_diff: command not found
or when using sudo you get the following error message
sudo: cg_diff: command not found
Solutions to cg_diff: command not found
How To Fix cg_diff: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu cg_diff is provided by valgrind package.
valgrind is:
Valgrind is a system for debugging and profiling Linux programs. With its tool suite you can automatically detect many memory management and threading bugs, avoiding hours of frustrating bug-hunting and making your programs more stable. You can also perform detailed profiling to help speed up your programs and use Valgrind to build new tools.
The Valgrind distribution currently includes six production-quality tools:
- a memory error detector (Memcheck)
- two thread error detectors (Helgrind and DRD)
- a cache and branch-prediction profiler (Cachegrind)
- a call-graph generating cache and branch-prediction profiler (Callgrind)
- a heap profiler (Massif) It also includes three experimental tools:
- a stack/global array overrun detector (SGCheck)
- a second heap profiler that examines how heap blocks are used (DHAT)
- a SimPoint basic block vector generator (BBV)
To fix this problem, we can install more using the command below.
sudo apt-get -y install valgrind
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install valgrind.
sudo apt -y install valgrind
Or if you have aptitude installed you can use the following command.
sudo aptitude install valgrind
Summary
In this tutorial we learn how to fix cg_diff command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.