gpt4 book ai didi

linux - MQTT Auth 插件 - 构建问题

转载 作者:太空宇宙 更新时间:2023-11-04 12:36:34 24 4
gpt4 key购买 nike

我正在尝试构建 MQTT Auth Plugin和面临的问题。我已按照@ http://www.yasith.me/2016/04/securing-mqtt-connection-using.html 提供的说明进行操作为此。这是我得到的错误 -

Using mosquitto source dir: /home/vagrant/Repos/mosquitto/mqtt/mosquitto
OpenSSL install dir: /usr/bin

If you changed the backend selection, you might need to 'make clean' first

CFLAGS: -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include
LDFLAGS: -L/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/
LDADD: -lcurl -L/usr/bin/lib -lcrypto -lmosquitto

cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o auth-plug.o auth-plug.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o base64.o base64.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o pbkdf2-check.o pbkdf2-check.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o log.o log.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o envs.o envs.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o hash.o hash.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o be-psk.o be-psk.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o backends.o backends.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o cache.o cache.c
cache.c: In function 'sha_hash':
cache.c:48:3: error: implicit declaration of function 'EVP_MD_CTX_new' [-Werror=implicit-function-declaration]
cache.c:48:23: error: initialization makes pointer from integer without a cast [-Werror]
cache.c:53:3: error: implicit declaration of function 'EVP_MD_CTX_free' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [cache.o] Error 1

我的 config.mk 文件看起来像 -

# Select your backends from this list
BACKEND_CDB ?= no
BACKEND_MYSQL ?= no
BACKEND_SQLITE ?= no
BACKEND_REDIS ?= no
BACKEND_POSTGRES ?= no
BACKEND_LDAP ?= no
BACKEND_HTTP ?= yes
BACKEND_JWT ?= no
BACKEND_MONGO ?= no

# Specify the path to the Mosquitto sources here
MOSQUITTO_SRC =/home/vagrant/Repos/mosquitto/mqtt/mosquitto

# Specify the path the OpenSSL here
OPENSSLDIR = /usr/bin

# Specify optional/additional linker flags here
LDFLAGS =

我在 LINUX 虚拟机( Vagrant )上执行此操作 - 不知道这是否会有任何不同。我能够看到所有 apt-get 都按预期安装了软件包。

有什么建议吗?

最佳答案

我相信这取决于您使用的 openssl 版本。 EVP_MD_CTX_new() 仅适用于 openssl 1.1.0。

关于linux - MQTT Auth 插件 - 构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41560370/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com