splint command not found

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

Introduction

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

splint: command not found

or when using sudo you get the following error message

sudo: splint: command not found

Solutions to splint: command not found

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

In Ubuntu splint is provided by splint package.

splint is:

splint is an annotation-assisted lightweight static checker. It is a tool for statically checking C programs for security vulnerabilities and coding mistakes. If additional effort is invested in adding annotations to programs, splint can perform stronger checking.

splint does many of the traditional lint checks including unused declarations, type inconsistencies, use before definition, unreachable code, ignored return values, execution paths with no return, likely infinite loops, and fall through cases. Problems detected by Splint include:

  • Dereferencing a possibly null pointer
  • Using or returning storage that is undefined or not properly defined
  • Type mismatches, with greater precision and flexibility than by C compilers
  • Memory management errors like use of dangling references and memory leaks
  • Inconsistent (with specified interface) global variable modification or use
  • Problematic control flow such as likely infinite loops etc.
  • Buffer overflow vulnerabilities
  • Dangerous macro implementations or invocations
  • Violations of customized naming conventions

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

sudo apt-get -y install splint

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

You can also use apt command to install splint.

sudo apt -y install splint

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

sudo aptitude install splint

Summary

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