hbmqtt_pub command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
hbmqtt_pub: command not found
or when using sudo you get the following error message
sudo: hbmqtt_pub: command not found
Solutions to hbmqtt_pub: command not found
How To Fix hbmqtt_pub: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu hbmqtt_pub is provided by python3-hbmqtt package.
python3-hbmqtt is:
HBMQTT is a MQTT client and broker implementation built on top of asyncio.
HBMQTT implements the full set of MQTT 3.1.1 protocol specifications and provides the following features:
- Support QoS 0, QoS 1 and QoS 2 messages flow
- Client auto-reconnection on network lost
- Authentication through password file (more methods can be added through a plugin system)
- Basic $SYS topics
- TCP and websocket support
- SSL support over TCP and websocket
- Plugin system
To fix this problem, we can install more using the command below.
sudo apt-get -y install python3-hbmqtt
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install python3-hbmqtt.
sudo apt -y install python3-hbmqtt
Or if you have aptitude installed you can use the following command.
sudo aptitude install python3-hbmqtt
Summary
In this tutorial we learn how to fix hbmqtt_pub command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.