portserver command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
portserver: command not found
or when using sudo you get the following error message
sudo: portserver: command not found
Solutions to portserver: command not found
How To Fix portserver: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu portserver is provided by python3-portpicker package.
python3-portpicker is:
Portpicker provides an API to find and return an available network port for an application to bind to. Ideally suited for use from unittests or for test harnesses that launch local servers.
It also contains an optional portserver that can be used to coordinate allocation of network ports on a single build/test farm host across all processes willing to use a port server aware port picker library such as this one.
To fix this problem, we can install more using the command below.
sudo apt-get -y install python3-portpicker
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install python3-portpicker.
sudo apt -y install python3-portpicker
Or if you have aptitude installed you can use the following command.
sudo aptitude install python3-portpicker
Summary
In this tutorial we learn how to fix portserver command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.