Hassbian 1.3 - Mosquitto Wont Install

I was going to do a fresh install from an older Hassbian to 1.3, but I can’t get Mosquitto to install properly. It appears there were some work arounds added and it results in a lot of errors when using the hassbian-config script.

I run the script and it generates what you see below, then asks for the username and for the password. It says its installed and running, but the service does not exist nor does /etc/mosquitto

Have tried a few times with the same result.

Any thoughts?

Here is my output:

pi@hassbian:~ $ sudo hassbian-config install mosquitto
Mosquitto Installer for Hassbian
Copyright(c) 2016 Dale Higgs <https://gitter.im/dale3h>
Modified by Landrash for use with Hassbian.
Adding mosquitto user
Adding system user `mosquitto' (UID 109) ...
Adding new group `mosquitto' (GID 114) ...
Adding new user `mosquitto' (UID 109) with group `mosquitto' ...
Creating home directory `/home/mosquitto' ...
Creating pid file
Creating data directory
Installing repository key
--2017-09-24 18:44:15--  http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
Resolving repo.mosquitto.org (repo.mosquitto.org)... 
Connecting to repo.mosquitto.org (repo.mosquitto.org)|... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3137 (3.1K) [application/octet-stream]
Saving to: ‘STDOUT’

-                                                           100%[========================================================================================================================================>]   3.06K  --.-KB/s    in 0s

2017-09-24 18:44:16 (61.5 MB/s) - written to stdout [3137/3137]

OK
Adding repository
--2017-09-24 18:44:17--  http://repo.mosquitto.org/debian/mosquitto-stretch.list
Resolving repo.mosquitto.org (repo.mosquitto.org)... 
Connecting to repo.mosquitto.org (repo.mosquitto.org)... connected.
HTTP request sent, awaiting response... 200 OK
Length: 50 [application/octet-stream]
Saving to: ‘mosquitto-stretch.list’

mosquitto-stretch.list                                      100%[========================================================================================================================================>]      50  --.-KB/s    in 0s

2017-09-24 18:44:17 (3.10 MB/s) - ‘mosquitto-stretch.list’ saved [50/50]

Installing mosquitto
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Get:2 http://repo.mosquitto.org/debian stretch InRelease [3,886 B]
Hit:3 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Hit:4 https://deb.nodesource.com/node_7.x stretch InRelease
Get:5 http://repo.mosquitto.org/debian stretch/main armhf Packages [2,397 B]
Fetched 6,283 B in 1s (3,359 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mosquitto : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
             Depends: libwebsockets3 (>= 1.2) but it is not installable
 mosquitto-clients : Depends: libmosquitto1 (= 1.4.12-0mosquitto1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Writing default configuration
/opt/hassbian/suites/install_mosquitto.sh: line 48: cd: /etc/mosquitto: No such file or directory
mv: cannot stat 'mosquitto.conf': No such file or directory
cp: cannot create regular file '/etc/mosquitto/mosquitto.conf': No such file or directory
chown: cannot access 'mosquitto.conf': No such file or directory
Initializing password file

Please take a moment to setup your first MQTT user
If no choice is made a default account will be created

Username: pi
Password:
Creating password entry for user pi
/opt/hassbian/suites/install_mosquitto.sh: line 77: mosquitto_passwd: command not found
Restarting Mosquitto service
Failed to restart mosquitto.service: Unit mosquitto.service not found.

Installation done!

Your MQTT broker is running at :1883 or if prefered hassbian.local

To continue have a look at https://home-assistant.io/docs/mqtt/

If you have issues with this script, please say something in the #Hassbian channel on Discord.
Original script by @dale3h on gitter.im

Make sure you run:

sudo apt update && sudo apt upgrade

before running:

sudo hassbian-config install mosquitto

1 Like

That’s the first thing I did after booting up the first time.

Also having the same issue with a clean install of hassbian 1.3

I downloaded libssl1.0.2 from here:

https://packages.debian.org/stretch/libssl1.0.2

used:

dpkg -i *.deb

to install then, then updated the package repository, and ran:

sudo hassbian-config install mosquitto

again.

@gregg098 did you solve your problem? if yes. how?

I have not had a chance to mess with it but the post right above yours shows a possible solution.

I followed these instructions which did the trick for me:

After that run these command to get things started at boot

sudo systemctl enable mosquitto.service
sudo systemctl start mosquitto.service

That did the trick for me. Thanks! Cannot believe it was that I was missing wow.