complexity command not found

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

Introduction

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

complexity: command not found

or when using sudo you get the following error message

sudo: complexity: command not found

Solutions to complexity: command not found

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

In Ubuntu complexity is provided by complexity package.

complexity is:

Complexity measurement tool help to:

  • locate suspicious areas in unfamiliar code
  • get an idea of how much effort may be required to understand that code
  • get an idea of the effort required to test a code base
  • provide a reminder to yourself. You may see what you’ve written as obvious, but others may not.

Comparing with existing tool McCabe, this program improves scoring of following language constructs:

  • code length
  • switch statement
  • logic conditions

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

sudo apt-get -y install complexity

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

You can also use apt command to install complexity.

sudo apt -y install complexity

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

sudo aptitude install complexity

Summary

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