I'm trying to build mosquitto from the source code (which is in the official github repository). After resolving some dependencies make install finishes without errors.
However, when testing mosquitto_pub I ran into the problem of missing libmosquitto.so.1 which was not in /var/lib. I copied it from the source code folder and managed to publish a message to the HiveMQ broker. However, I cannot publish to the local broker (connection refused). I can't find the log (it's not in /var/log) and mosquitto.conf is only in the folder I downloaded from the repository.
I've already tried changing allow_anonymous in it and recompiling later, but the same problem remains.
When trying to check the service status, the following lines are displayed:
● mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/etc/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2023-10-25 10:46:51 BST; 7s ago
Process: 11395 ExecStart=/usr/local/bin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=exited, status=203/EXEC)
Main PID: 11395 (code=exited, status=203/EXEC)
CPU: 577us
Any idea where I might be going wrong?
I can publish and subscribe to an external broker, but I cannot do it to the local broker. Is there independence between mosquitto clients and the broker?