# 下载源代码包
# 解压
tar zxfv mosquitto-1.4.5.tar.gz
#去到目录里,
make
make install
#就出现了fatal error: ares.h: No such file or directory错误
sudo apt-get install libc-ares-dev
sudo apt-get install libc-ares2
#出现了fatal error: uuid/uuid.h: No such file or directory错误
sudo apt-get install uuid-dev
#出现了找不到uuid/uuid.h
sudo apt-get install uuid-dev
#找不到libmosquitto.so.1,error while loading shared libraries: libmosquitto.so.1: cannot open shared object file: No such file or directory
#解决方法:创建链接
sudo ln -s /usr/local/lib/libmosquitto.so.1 /usr/lib/libmosquitto.so.1
# 更新动态链接库
sudo ldconfig
#如果make: g++:命令未找到
sudo apt-get install g++
sudo apt-get install g++