项目中用到mosquitto,在进行源码编译时遇到问题,特进行记录汇总
1.Could NOT find cJSON
具体报错信息为:
-- Could NOT find cJSON (missing: CJSON_INCLUDE_DIR CJSON_LIBRARY)
-- Optional dependency cJSON not found. Some features will be disabled.
解决办法:
最好在工程文件夹下创建一专门用于编译cJSON的文件夹,执行如下代码
git clone https://github.com/DaveGamble/cJSON.git
cd cJSON
mkdir build
cmake ../
make
make install
2.xsltproc not found: manpages cannot be built
具体报错信息为:
CMake Error at man/CMakeLists.txt:29 (message):
xsltproc not found: manpages cannot be built
解决办法:
sudo apt-get install -y xsltproc
3.xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
具体报错信息为:
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 9 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
解决办法:
sudo apt-get install docbook-xsl docbook-xml