我已使用命令apt-get install mosquitto
安装了mosquitto。它已成功安装在我的系统上,但我得到版本" 1.4.5"。我想降级到1.4.4版,所以我尝试使用源tar文件。在文件夹下,我正在运行命令make
并且它正在抛出错误:
set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory `/home/ubuntu/org.eclipse.mosquitto-1.4.4/lib'
cc -Wall -ggdb -O2 -I. -I.. -I../lib -fPIC -DWITH_TLS -DWITH_TLS_PSK -DWITH_THREADING -DWITH_SOCKS -DWITH_SRV -c mosquitto.c -o mosquitto.o
In file included from mosquitto.c:33:0:
./mosquitto_internal.h:27:27: fatal error: openssl/ssl.h: No such file or directory
# include <openssl/ssl.h>
^
compilation terminated.
make[1]: *** [mosquitto.o] Error 1
make[1]: Leaving directory `/home/ubuntu/org.eclipse.mosquitto-1.4.4/lib'
make: *** [mosquitto] Error 2
这里出了什么问题?有没有其他方法可以安装1.4.4版本的mosquitto?
由于
答案 0 :(得分:2)
您缺少编译所需的依赖项。
尝试:
apt-get install libc-ares-dev libssl-dev libwrap0-dev uthash-dev uuid-dev
如果你想要libwebsockets支持你可以安装libwebsockets-dev,或者更好地从源代码手动安装它 - 这将得到你的版本1.5而不是Debian / Ubuntu中的旧版本1.2。
如果使用
安装手动编译的版本make prefix=/usr install
然后它将覆盖现有的二进制文件,您可以将它与现有的系统服务一起使用。