needs-restarting command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
needs-restarting: command not found
or when using sudo you get the following error message
sudo: needs-restarting: command not found
Solutions to needs-restarting: command not found
How To Fix needs-restarting: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu needs-restarting is provided by zypper package.
zypper is:
Zypper is a command line tool for managing software. It can be used to add package repositories, search for packages, install, remove, or update packages, install patches, hardware drivers, verify dependencies, and more. Zypper can be used interactively or non-interactively by user, from scripts, or front-ends.
To fix this problem, we can install more using the command below.
sudo apt-get -y install zypper
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install zypper.
sudo apt -y install zypper
Or if you have aptitude installed you can use the following command.
sudo aptitude install zypper
Summary
In this tutorial we learn how to fix needs-restarting command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.