phpmd command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
phpmd: command not found
or when using sudo you get the following error message
sudo: phpmd: command not found
Solutions to phpmd: command not found
How To Fix phpmd: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu phpmd is provided by phpmd package.
phpmd is:
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. This project uses PHP Depend to measure several software metrics from given source code, then it compares the calculated values with customizable thresholds and reports all suspect software artifacts.
To fix this problem, we can install more using the command below.
sudo apt-get -y install phpmd
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install phpmd.
sudo apt -y install phpmd
Or if you have aptitude installed you can use the following command.
sudo aptitude install phpmd
Summary
In this tutorial we learn how to fix phpmd command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.