mosquitto (on windows) command not found
Solution 1
None of mosquitto, mosquitto_pub nor mosquitto_pub are gui programs. You will need to run them through cmd.exe or powershell or similar. So for example:
run cmd.exe
cd <path to executables>
mosquitto_sub -h test.mosquitto.org -t '#'
On the "command not found" error, did you follow the instructions in the installer for installing dependencies?
- OpenSSL - install 'Win32 OpenSSL vXXXXX Light' then copy dlls to the mosquitto directory - http://slproweb.com/products/Win32OpenSSL.html
- pthreads - copy 'pthreadVC2.dll' to the mosquitto directory ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x86/
Solution 2
As per the readme-windows.txt file (found under the installation director), the dependencies (OpenSSL abd Pthread) are not provided with the installer and needs to be installed separately:
- libeay32.dll ssleay32.dll from open ssl (Download the OpenSSL from here and copy/paste these two dlls under mosquitto installation director)
- pthreadVC2.dll (download the dll from here and paste under mosquitto installation director)
Solution 3
do not install win64openSSL, even you do have 64bit OS :) as far as mosquitto is 32bit app, it will work with Win32OpenSSL only ...
avelampudi
Updated on June 04, 2022Comments
-
avelampudi about 2 years
I'm a newbie to
MQTT
andmosquitto
. I recently installedmosquitto
on my Windows OS using the Windows binary installation file on the website (http://www.eclipse.org/downloads/download.php?file=/mosquitto/binary/win32/mosquitto-1.4.2-install-win32.exe).However, when I try to run the mosquitto commands, it displays an error saying that the command is not found. Upon Googling this, I found the same instructions to download the binary installation.
Even when I open the mosquitto folder saved in my Program Files and try to run the broker application, the window opens for a split second and then shuts off. I also have HiveMQ downloaded. Could that be the issue?
I cannot understand what I might have done wrong during the installation otherwise. Please help!
-
avelampudi about 9 yearsThank you! I'd not copied all the dlls properly.
-
saurabh kamble over 8 years@ralight i am getting this error followed your steps , the ordinal 314 could not be located in the dynamic link library mosquitto
-
ralight over 8 yearsMake sure you have all of the most up to date libraries and that you have the Visual Studio 2013 redistributables installed.
-
SteckDEV over 7 yearsMake sure you use the Win32OpenSSL_Light-1_0_2j.exe otherwise it will not contain: libeay32.dll ssleay32.dll Step 8: sivatechworld.wordpress.com/2015/06/11/…