[MQTT] MQTT學習紀錄 - 安裝 Mosquitto MQTT Broker

  • 2539
  • 0
  • 2022-02-14

  這是個人使用MQTT與Mosquitto的重點紀錄,不會有系統性、循序漸進的教學,只將碰到的問題Highlight出來。

  • 安裝版本
  • 額外安裝、下載檔案
    • vcruntime140.dll
    • api-ms-win-crt-stdio-l1-1.0.dll
    • libcrypto-1_1.dll、libssl-1_1.dll
    • libeay32.dll、ssleay32.dll
    • pthreadVC2.dll

  【安裝版本】

  • mosquitto-1.6.12a-install-windows-x32(下載時最新版本)

  網路上Windows版本教學都是安裝32bit版本,所以跟著使用。


  【額外安裝、下載檔案】

  1. vcruntime140.dll

  因為Mosquitto使用Visual Studio編譯(有說 Visual Studio 2015,不保證之後版本),加上要安裝的Server很乾淨,所以需要手動安裝 VC++ 可轉散發套件(Redistributable Package),安裝2019版本就會包含2015、2017,否則會出現「電腦遺失VCRUNTIME140.dll」訊息。

  下載位置:https://support.microsoft.com/zh-tw/help/2977003/the-latest-supported-visual-c-downloads

  2. api-ms-win-crt-stdio-l1-1.0.dll

  裝了 Microsoft Visual C++ Redistributable for Visual Studio 2015、2017 和 2019 的64bit版本之後,vcruntime140.dll有了,變成遺失這個dll,所幸將x86、x64都安裝,就沒有遺漏了。

  3. libcrypto-1_1.dll、libssl-1_1.dll

  readme.txt寫說要安裝OpenSSL取得這兩個dll,結果裝完複製時才發現1.6.12版安裝完就有這兩個dll。

* OpenSSL
  Link: http://slproweb.com/products/Win32OpenSSL.html
  Install "Win32 OpenSSL 1.1.0* Light" or "Win64 OpenSSL 1.1.0* Light"
  Required DLLs: libssl-1_1.dll, libcrypto-1_1.dll or libssl-1_1-x64.dll, libcrypto-1_1-x64.dll

  4. libeay32.dll、ssleay32.dll

  Mosquitto 1.5.1 之後的版本就不需要了,如果安裝舊版本,請參考下面文章:

  5. pthreadVC2.dll

  與第4點相同,1.5.1 開始不需要另外下載。

  下載位置:ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x86/