Alpine源码构建mosquitto
接续这篇使用apk安装mosquitto的文章,本文将介绍通过源码编译的方式使用mosquitto,主要用于对mosquitto和mqtt协议的学习和调试。
下载mosquitto源码
git clone https://github.com/eclipse/mosquitto.git
安装构建依赖包
apk add gcc g++ make cmake gfortran libffi-dev openssl-dev libtool
apk add c-ares-dev util-linux-dev libxslt
apk add docbook-xsl
进入源码目录一顿cmake
mkdir build
cd build
cmake .. && make -j4 && make install
启动mosquitto
mosquitto -c mosquitto.conf
解决引入docbook的问题
如果出现以下错误,是因为没有安装docbook-xsl
这个包
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
apk add docbook-xsl
暂无标签
感谢扫码支持

