Closed Avinash-Gahlowt closed 2 days ago
Hello @Avinash-Gahlowt,
you uninstalled the wrong mqtt-cli. I could reproduce your issue by installing it via pip:
pip install mqtt-cli
which ultimately installs this tool: https://github.com/MO-RISE/mqtt-cli
Unfortunately it looks like you installed it to the global package scope of python, i.e. not in an environment which makes it hard to remove the wrong package with all of its dependencies but you should be able to remove it all with:
pip uninstall -y mqtt-cli paho-mqtt parse persist-queue
Once everything is removed the command should not be found anymore, something like this:
$ mqtt
zsh: command not found: mqtt
Now, follow the guide in our documentation to install the cli: https://hivemq.github.io/mqtt-cli/docs/installation/#debian-package
wget https://github.com/hivemq/mqtt-cli/releases/download/v4.30.0/mqtt-cli-4.30.0.deb
sudo apt install ./mqtt-cli-4.30.0.deb
After you successfully installed our mqtt-cli you should get the following output:
$ mqtt
Usage: mqtt [-hV] { pub | sub | shell | test | hivemq | swarm }
MQTT Command Line Interpreter.
Options:
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
pub, publish Publish a message to a list of topics.
sub, subscribe Subscribe an MQTT client to a list of topics.
shell, sh Starts MqttCLI in shell mode, to enable interactive mode with further sub commands.
test Tests the specified broker on different MQTT feature support and prints the results.
hivemq HiveMQ Command Line Interpreter.
swarm HiveMQ Swarm Command Line Interpreter.
Or the version option should print something like the following:
$ mqtt --version
4.30.0
Picocli 4.7.6
JVM: 11.0.22 (Azul Systems, Inc. OpenJDK 64-Bit Server VM 11.0.22+7-LTS)
OS: Mac OS X 14.5 aarch64
Thanks @LukasBrand
The solution worked for me , i didn't have to reinstall, just by firing the first command it started working properly.
I have
Ubuntu 22.04
installed and communicating with a device installed with NVidia Jetson. I have installed MQTT-Cli v4.25.0 on my OS. However, I am getting the following error which trying to publish a simple message: For a simple publish commandmqtt pub -h localhost -t test -m "Hello"
, the terminal throws the following error:I tried reinstalling the mqtt-cli multiple times but the error persists. On trying find the version using
mqtt --version
, it generates the following traceback:I have used the same API earlier successfully on the same OS to communicate with devices without GPU. Any idea why could this be happening for the device with GPU?
As an aside, when I use
mosquitto
as a broker, I am able to communicate with the same device successfully.