17.8.2017
SOme problems with MQTT on Strech (RPI 2)
Problem 1) installing mosquitto
pi@mqtt:~/Install-Programmes $ sudo apt-get install mosquitto
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
----------------------------------------------------------------------------------------------------------------------------------------------------------
Problem 2)
Attempting to install: sudo apt-get install -y mosquitto-client python3-mosquitto
Reading package lists... Done
E: Unable to locate package mosquitto-client
E: Unable to locate package python3-mosquitt
On Jessie the install all worked.
Can some one please advise me and thanks
BD
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6392
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STRECH and MQTT
What do you see if you run 'aptitude search ~o'
Re: STRECH and MQTT
Showed nothing
Install based on https://iotbytes.wordpress.com/mosquitt ... pberry-pi/
BUT I re-formatted the SD re copied stretch and manually (the following commands were in a batch)
mkdir mosquitto
cd mosquitto
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list
apt-get install mosquitto
........
pi@mqtt:/etc/apt/sources.list.d $ netstat -tln | grep 1883
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN
tcp6 0 0 :::1883 :::* LISTEN
So this now works.
aptitude search ~o still shows no information
But this is the same SD, The same RPi, the img ...I am perplexed to why the mqtt Broker now gets installed
Re: STRECH and MQTT
Why are you using the wheezy list?bonzadog wrote: ↑Thu Aug 17, 2017 4:14 pm
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list
Looking at https://mosquitto.org/2013/01/mosquitto ... epository/ I would have used the one for jessie
And I just had a look at the repo and I think there's actually already a mosquitto repo for stretch.
Re: STRECH and MQTT
Yes, I overlooked that wheezy reference. I suppose I should use strech instead of wheezy?DirkS wrote: ↑Thu Aug 17, 2017 4:23 pmWhy are you using the wheezy list?bonzadog wrote: ↑Thu Aug 17, 2017 4:14 pm
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list
Looking at https://mosquitto.org/2013/01/mosquitto ... epository/ I would have used the one for jessie
And I just had a look at the repo and I think there's actually already a mosquitto repo for stretch.
But the was when I installed mosquitto there was no "already installed" message.
How can one see if a install programme is available ..Yoi mention looking at the repo.
Much appeciate you help!
B
Re: STRECH and MQTT
After 'apt update' you can check available packages / versions with apt-cache policy. E.g.
Code: Select all
apt-cache policy mosquitto
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6392
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STRECH and MQTT
Ah, when I tried it, I just installed it from the stock repos.
- DougieLawson
- Posts: 42313
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STRECH and MQTT
Does that include the recent security fix?ShiftPlusOne wrote: ↑Fri Aug 18, 2017 9:07 amAh, when I tried it, I just installed it from the stock repos.
I find it easier to add the Mosquitto repo and install the latest from there.
https://mosquitto.org/2013/01/mosquitto ... epository/
Using
http://repo.mosquitto.org/debian/mosquitto-stretch.list to get the version for Stretch.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6392
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STRECH and MQTT
No idea, I don't actually use it. I was just checking that there's nothing wrong with the stock repos.DougieLawson wrote:Does that include the recent security fix?
Re: STRECH and MQTT
I have exactly the same problem as bonzadog even when I use the mosquitto-stretch.list.
Any suggestions appreciated
Any suggestions appreciated
-
- Posts: 28
- Joined: Wed Aug 23, 2017 10:37 am
Re: STRECH and MQTT
+1 for me as well.
Cannot get Mosquitto to install under Stretch as per OP Problem 1.
Why is life so difficult with Linux.
Cannot get Mosquitto to install under Stretch as per OP Problem 1.
Why is life so difficult with Linux.

Re: STRECH and MQTT
bullockbob wrote: ↑Wed Aug 23, 2017 10:41 am+1 for me as well.
Cannot get Mosquitto to install under Stretch as per OP Problem 1.
Why is life so difficult with Linux.![]()
23.8.2017
Hi,
There are also problems installing opencv 3.x with stretch, however, I could install opencv 3.2 on the 2017-06-21 version of Jessie.
Bonzadog
( I got a few PM regarding the name. Bonzadog was an original English Group in the 1960's. Their full name was Bonza Dog Doo Dah Band)
-
- Posts: 28
- Joined: Wed Aug 23, 2017 10:37 am
Re: STRECH and MQTT
I had no problem installing Mosquitto under Jessie either. But Stretch appears to be an entirely different story.
Lucky the RPi is relatively cheap allowing for a test server
Lucky the RPi is relatively cheap allowing for a test server

- DougieLawson
- Posts: 42313
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STRECH and MQTT
Can you folks explain what part of viewtopic.php?p=1201759#p1199879 isn't working for you?
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: STRECH and MQTT
Results:
It still shows the same thing.
I currently have have Raspbian Jessie.
Unix Instructions:
This is what I did as per your instructions:
To use the new repository you should first import the repository package signing key:
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
Then make the repository available to apt:
cd /etc/apt/sources.list.d/
Then one of the following, depending on which version of debian you are using:
sudo wget http://repo.mosquitto.org/debian/mosquitto-stretch.list
Then update apt information:
apt-get update
And discover what mosquitto packages are available:
apt-cache search mosquitto
Or just install:
apt-get install mosquitto
PS: Relatively new in this. I am trying to install MQTT broker to use it in Node-Red workflows. Looking forward to your help.
Thank you,
itzdip
It still shows the same thing.
Current OS:The following packages have unmet dependencies:
mosquitto : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
I currently have have Raspbian Jessie.
Unix Instructions:
This is what I did as per your instructions:
To use the new repository you should first import the repository package signing key:
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
Then make the repository available to apt:
cd /etc/apt/sources.list.d/
Then one of the following, depending on which version of debian you are using:
sudo wget http://repo.mosquitto.org/debian/mosquitto-stretch.list
Then update apt information:
apt-get update
And discover what mosquitto packages are available:
apt-cache search mosquitto
Or just install:
apt-get install mosquitto
PS: Relatively new in this. I am trying to install MQTT broker to use it in Node-Red workflows. Looking forward to your help.
Thank you,
itzdip
-
- Posts: 28
- Joined: Wed Aug 23, 2017 10:37 am
Re: STRECH and MQTT
Hi thereDougieLawson wrote: ↑Wed Aug 23, 2017 2:00 pmCan you folks explain what part of viewtopic.php?p=1201759#p1199879 isn't working for you?
Exactly as I explained previously, the exact same problem I have is what the OP Prob #1 has/had. I first tried using the jessie list and got the Prob 1 error. Then I tried with the stretch list and got the exact same error (exact same as OP Prob #1).
?
Actual error msg is:
pi@raspberrypi:/etc/apt/sources.list.d $ sudo apt-get install mosquitto
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
E: Unable to correct problems, you have held broken packages.
- DougieLawson
- Posts: 42313
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STRECH and MQTT
So you'll need to report that to Roger Light on the Mosquitto mailing list.
https://mosquitto.org/support/
https://mosquitto.org/support/
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: STRECH and MQTT
Someone opened an issue at https://github.com/eclipse/mosquitto/issues/529
-
- Posts: 28
- Joined: Wed Aug 23, 2017 10:37 am
Re: STRECH and MQTT
Does anyone actually have the Mosquitto broker installed and running under Stretch? If so, can they detail their exact steps for the installation process? That would be really helpful.
If not, any other suggestions for a MQTT broker installed under Raspbian would be helpful as it appears there has been no help on the Mosquitto forum, so maybe it's time to look for alternatives.
Thanks
If not, any other suggestions for a MQTT broker installed under Raspbian would be helpful as it appears there has been no help on the Mosquitto forum, so maybe it's time to look for alternatives.
Thanks
- DougieLawson
- Posts: 42313
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STRECH and MQTT
Yes. But only by installing it on Jessie and upgrading that to Stretch.bullockbob wrote: ↑Mon Aug 28, 2017 1:59 amDoes anyone actually have the Mosquitto broker installed and running under Stretch? If so, can they detail their exact steps for the installation process? That would be really helpful.
https://github.com/eclipse/mosquitto/issues/529
You can build from source.
sudo apt-get install cmake libssl1.0-dev libwebsockets-dev uuid-dev
cd /tmp
wget http://mosquitto.org/files/source/mosquitto-1.4.14.tar.gz
tar xavf mosquitto-1.4.14.tar.gz
cd mosquitto-1.4.14
cmake .
# cmake -DWITH_WEBSOCKETS=ON . if you need websockets support
make -j4
sudo make install
Last edited by DougieLawson on Mon Aug 28, 2017 10:07 am, edited 2 times in total.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: STRECH and MQTT
bullockbob wrote: ↑Mon Aug 28, 2017 1:59 amDoes anyone actually have the Mosquitto broker installed and running under Stretch? If so, can they detail their exact steps for the installation process? That would be really helpful.
Code: Select all
pi@raspberrypi:~ $ sudo apt install mosquitto
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libev4 libuv1 libwebsockets8
Suggested packages:
apparmor
The following NEW packages will be installed:
libev4 libuv1 libwebsockets8 mosquitto
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 312 kB of archives.
After this operation, 707 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libev4 armhf 1:4.22-1 [34.0 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libuv1 armhf 1.9.1-3 [73.2 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libwebsockets8 armhf 2.0.3-2 [85.1 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian stretch/main armhf mosquitto armhf 1.4.10-3 [119 kB]
Fetched 312 kB in 0s (746 kB/s)
apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "nb_NO.UTF-8",
LC_MONETARY = "nb_NO.UTF-8",
LC_ADDRESS = "nb_NO.UTF-8",
LC_TELEPHONE = "nb_NO.UTF-8",
LC_NAME = "nb_NO.UTF-8",
LC_MEASUREMENT = "nb_NO.UTF-8",
LC_IDENTIFICATION = "nb_NO.UTF-8",
LC_NUMERIC = "nb_NO.UTF-8",
LC_PAPER = "nb_NO.UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package libev4.
(Reading database ... 55899 files and directories currently installed.)
Preparing to unpack .../libev4_1%3a4.22-1_armhf.deb ...
Unpacking libev4 (1:4.22-1) ...
Selecting previously unselected package libuv1:armhf.
Preparing to unpack .../libuv1_1.9.1-3_armhf.deb ...
Unpacking libuv1:armhf (1.9.1-3) ...
Selecting previously unselected package libwebsockets8:armhf.
Preparing to unpack .../libwebsockets8_2.0.3-2_armhf.deb ...
Unpacking libwebsockets8:armhf (2.0.3-2) ...
Selecting previously unselected package mosquitto.
Preparing to unpack .../mosquitto_1.4.10-3_armhf.deb ...
Unpacking mosquitto (1.4.10-3) ...
Setting up libev4 (1:4.22-1) ...
Setting up libuv1:armhf (1.9.1-3) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for systemd (232-25+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libwebsockets8:armhf (2.0.3-2) ...
Setting up mosquitto (1.4.10-3) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for systemd (232-25+deb9u1) ...
Code: Select all
pi@raspberrypi:~ $ sudo service mosquitto start
Code: Select all
pi@raspberrypi:~ $ systemctl status mosquitto.service
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
Loaded: loaded (/etc/init.d/mosquitto; generated; vendor preset: enabled)
Active: active (running) since Mon 2017-08-28 09:30:39 UTC; 5min ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/mosquitto.service
└─1939 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Aug 28 09:30:39 raspberrypi systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Aug 28 09:30:39 raspberrypi mosquitto[1928]: Starting network daemon:: mosquitto.
Aug 28 09:30:39 raspberrypi systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.
- DougieLawson
- Posts: 42313
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STRECH and MQTT
What version does that get? Is it 1.14? Does it have the websockets support?
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
-
- Posts: 28
- Joined: Wed Aug 23, 2017 10:37 am
Re: STRECH and MQTT
DougieLawson wrote: ↑Mon Aug 28, 2017 9:26 am
You can build from source.
sudo apt-get install cmake libssl1.0-dev libwebsockets-dev uuid-dev
Installing from Stretch, this line gives me :
Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.7.2-1).
uuid-dev is already the newest version (2.29.2-1).
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:
libssl-dev : Conflicts: libssl1.0-dev but 1.0.2l-2 is to be installed
libssl1.0-dev : Conflicts: libssl-dev but 1.1.0f-3 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
- DougieLawson
- Posts: 42313
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STRECH and MQTT
It worked for me on a fresh install of 2017-08-16 Raspbian.
Try using synaptic or aptitude to do the install for you. They can resolve the conflicts.
Try using synaptic or aptitude to do the install for you. They can resolve the conflicts.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
-
- Posts: 28
- Joined: Wed Aug 23, 2017 10:37 am
Re: STRECH and MQTT
Thanks for your time and help. Aptitude did indeed perform an install of Mosquitto from scratch on Stretch. The version installed was several behind current (inc the security patch), but I used your instructions for building from source to update to the current.DougieLawson wrote: ↑Mon Aug 28, 2017 10:09 amIt worked for me on a fresh install of 2017-08-16 Raspbian.
Try using synaptic or aptitude to do the install for you. They can resolve the conflicts.
Thanks again.
