websocketd command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
websocketd: command not found
or when using sudo you get the following error message
sudo: websocketd: command not found
Solutions to websocketd: command not found
How To Fix websocketd: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu websocketd is provided by websocketd package.
websocketd is:
websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSocket.
WebSocket-capable applications can now be built very easily. As long as you can write an executable program that reads STDIN and writes to STDOUT, you can build a WebSocket server. Do it in Python, Ruby, Perl, Bash, C, Go, PHP, Java, Clojure, Scala, Groovy, Expect, Awk, VBScript, Haskell, Lua, R, whatever! No networking libraries necessary.
websocketd will start a WebSocket server on a specified port, and listen for connections.
Upon a connection, it will fork the appropriate process, and disconnect the process when the WebSocket connection closes (and vice-versa).
Any message sent from the WebSocket client will be piped to the process’s STDIN stream, followed by a \n newline.
To fix this problem, we can install more using the command below.
sudo apt-get -y install websocketd
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install websocketd.
sudo apt -y install websocketd
Or if you have aptitude installed you can use the following command.
sudo aptitude install websocketd
Summary
In this tutorial we learn how to fix websocketd command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.