op2calltree command not found

In this troubleshooting guide we learn how to fix op2calltree command not found error message

Introduction

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

op2calltree: command not found

or when using sudo you get the following error message

sudo: op2calltree: command not found

Solutions to op2calltree: command not found

How To Fix op2calltree: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu op2calltree is provided by kcachegrind-converters package.

kcachegrind-converters is:

This is a collection of scripts for converting the output from several different profiling tools into a format that KCachegrind can display.

KCachegrind is a visualisation tool for the profiling data generated by calltree, a memory profiling tool for valgrind. Executables can be profiled using calltree without being recompiled, including multi-threaded applications, shared libraries, and plugin architectures.

The included scripts are:

  • dprof2calltree: converts the tmon.out output of Perl’s Devel::DProf package
  • memprof2calltree: converts the memory profiles of memprof
  • op2calltree: converts the OProfile’s output of “opreport -gdf” (v 0.8)
  • pprof2calltree: converts the pprof output from APD

This package is part of the KDE Software Development Kit module.

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

sudo apt-get -y install kcachegrind-converters

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

You can also use apt command to install kcachegrind-converters.

sudo apt -y install kcachegrind-converters

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

sudo aptitude install kcachegrind-converters

Summary

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