daphne command not found

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

Introduction

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

daphne: command not found

or when using sudo you get the following error message

sudo: daphne: command not found

Solutions to daphne: command not found

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

In Ubuntu daphne is provided by daphne package.

daphne is:

Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI, and developed to power Django Channels.

It supports automatic negotiation of protocols; there’s no need for URL prefixing to determine WebSocket endpoints versus HTTP endpoints.

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

sudo apt-get -y install daphne

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

You can also use apt command to install daphne.

sudo apt -y install daphne

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

sudo aptitude install daphne

Summary

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