centos7下面安装eclipse paho C客户端

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lcr_happy/article/details/89279507

1、安装git

yum install git

2、安装make cmake gcc

yum install make cmake gcc

3、安装openssl库

yum install openssl openssl-devel

4、执行:

git clone https://github.com/eclipse/paho.mqtt.c
cd paho.mqtt.c
make 
make install

在make install的时候最后会报错:

install -m 644 build/output/doc/MQTTClient/man/man3/MQTTClient.h.3 /usr/local/share/man/man3
install: 无法获取"build/output/doc/MQTTClient/man/man3/MQTTClient.h.3" 的文件状态(stat): 没有那个文件或目录
make: [install] 错误 1 (忽略)
install -m 644 build/output/doc/MQTTAsync/man/man3/MQTTAsync.h.3 /usr/local/share/man/man3
install: 无法获取"build/output/doc/MQTTAsync/man/man3/MQTTAsync.h.3" 的文件状态(stat): 没有那个文件或目录
make: [install] 错误 1 (忽略)

这是因为:查看build路径,发现没有生成doc文件夹,需要运行 make html 生成。

但是官网文档说明,如果执行这个需要安装:
To build the documentation requires doxygen and optionally graphviz.

yum install doxygen graphviz

执行:

make html

5、完成上述操作之后,我们先要unintsall一下之前已经安装好的,再重新安装

make uninstall
make install

done.


猜你喜欢

转载自blog.csdn.net/lcr_happy/article/details/89279507