mosquitto1.4 编译安装遇到的问题

来源:互联网 发布:石油库存公布数据 编辑:程序博客网 时间:2024/05/21 08:47

当你安装mosquitto1.4最新版本的时候或多或少会遇到问题。

我是用的centos系统,系统默认很多没有安装

假如你是ubuntu系统请使用 apt-get 代替yum

首先是安装各种工具

yum install gcc gcc-c++ libstdc++-devel 

编译过程中问题:

1. ssh.h找不到

yum install openssl-devel

2.ares.h找不到

yum install c-ares-devel

3.如果你添加了websocket

借助git工具 yum install git

wget http://git.warmcat.com/cgi-bin/cgit/libwebsockets/snapshot/libwebsockets-1.3-chrome37-firefox30.tar.gz

tar -zxvf libwebsockets-1.3-chrome37-firefox30.tar.gz

cd libwebsockets-1.3-chrome37-firefox30

mkdir buildcd buildcmake .. -DOPENSSL_ROOT_DIR=/usr/bin/opensslmakesudo make install
4.uuid.h找不到
yum install libuuid-devel
5.mosquitto: error while loading shared libraries: libwebsockets.so.4.0.0: cannot open shared object file: No such file or directory
库的问题
sudo ln -s /usr/local/lib64/libwebsockets.so.4.0.0 /usr/lib/libwebsockets.so.4.0.0
还不行的话:
sudo vi /etc/ld.so.conf.d/lib64c.conf

…and add the following lines:-

# lib64c default configuration/usr/local/lib64

…and then:-

sudo ldconfig
还有一个解决办法


0 0
原创粉丝点击