We’ve read about MQTT authentication and authorization, and we’ve started the process by installing the necessary files.
Such as the following:
- git
- mosquitto-dev
- libmosquitto-dev
- postgresql-server-dev-9.6
- build-essential
- libssl-dev
We then cloned the repository and as described:
cd /opt
sudo git clone https://github.com/jpmens/mosquitto-auth-plug.git
We then configured the config file by following command (No file was called config.mk, but config.mk.inm so by running following command it created a new file called config.mk):
sudo nano /opt/mosquitto-auth-plug/config.mk
This is what’s written in the configuration file:
(#) Select your backends from this list
BACKEND_CDB ?= no
BACKEND_MYSQL ?= no
BACKEND_SQLITE ?= no
BACKEND_REDIS ?= no
BACKEND_POSTGRES ?= yes
BACKEND_LDAP ?= no
BACKEND_HTTP ?= no
BACKEND_JWT ?= no
BACKEND_MONGO ?= no
BACKEND_FILES ?= yes
BACKEND_MEMCACHED ?= no(#) Specify the path to the Mosquitto sources here
MOSQUITTO_SRC =(#) Specify the path the OpenSSL here
OPENSSLDIR = /usr(#) Specify optional/additional linker/compiler flags here
(#) On macOS, add
(#) CFG_LDFLAGS = -undefined dynamic_lookup
(#) as described in https://github.com/eclipse/mosquitto/issues/244
CFG_LDFLAGS =
CFG_CFLAGS = -DRAW_SALT
Then when compiling the plugin by following commands:
cd /opt/mosquitto-auth-plug
sudo make
We receive following error:
ingen sådan fil eller filkatalog = no such file or directory
What is causing this fatal error?