User avatar
bonzadog
Posts: 161
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

STRECH and MQTT

Thu Aug 17, 2017 1:59 pm

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
Raspberry Pi Engineer & Forum Moderator
Posts: 4696
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: STRECH and MQTT

Thu Aug 17, 2017 2:13 pm

What do you see if you run 'aptitude search ~o'

User avatar
bonzadog
Posts: 161
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: STRECH and MQTT

Thu Aug 17, 2017 4:14 pm

ShiftPlusOne wrote:
Thu Aug 17, 2017 2:13 pm
What do you see if you run 'aptitude search ~o'
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

DirkS
Posts: 7639
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: STRECH and MQTT

Thu Aug 17, 2017 4:23 pm

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
Why are you using the 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.

User avatar
bonzadog
Posts: 161
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: STRECH and MQTT

Thu Aug 17, 2017 4:49 pm

DirkS wrote:
Thu Aug 17, 2017 4:23 pm
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
Why are you using the 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.
Yes, I overlooked that wheezy reference. I suppose I should use strech instead of wheezy?

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

DirkS
Posts: 7639
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: STRECH and MQTT

Thu Aug 17, 2017 5:58 pm

bonzadog wrote:
Thu Aug 17, 2017 4:49 pm
How can one see if a install programme is available ..Yoi mention looking at the repo.
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
Raspberry Pi Engineer & Forum Moderator
Posts: 4696
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: STRECH and MQTT

Fri Aug 18, 2017 9:07 am

Ah, when I tried it, I just installed it from the stock repos.

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: STRECH and MQTT

Fri Aug 18, 2017 1:51 pm

ShiftPlusOne wrote:
Fri Aug 18, 2017 9:07 am
Ah, when I tried it, I just installed it from the stock repos.
Does that include the recent security fix?

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.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4696
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: STRECH and MQTT

Fri Aug 18, 2017 1:55 pm

DougieLawson wrote:Does that include the recent security fix?
No idea, I don't actually use it. I was just checking that there's nothing wrong with the stock repos.

bingyd
Posts: 2
Joined: Tue Aug 22, 2017 9:11 pm

Re: STRECH and MQTT

Tue Aug 22, 2017 9:17 pm

I have exactly the same problem as bonzadog even when I use the mosquitto-stretch.list.
Any suggestions appreciated

bullockbob
Posts: 6
Joined: Wed Aug 23, 2017 10:37 am

Re: STRECH and MQTT

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. :roll:

User avatar
bonzadog
Posts: 161
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: STRECH and MQTT

Wed Aug 23, 2017 12:13 pm

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. :roll:

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)

bullockbob
Posts: 6
Joined: Wed Aug 23, 2017 10:37 am

Re: STRECH and MQTT

Wed Aug 23, 2017 1:21 pm

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 :)

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: STRECH and MQTT

Wed Aug 23, 2017 2:00 pm

Can you folks explain what part of viewtopic.php?p=1201759#p1199879 isn't working for you?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

itzdip
Posts: 1
Joined: Wed Aug 23, 2017 6:05 pm

Re: STRECH and MQTT

Wed Aug 23, 2017 6:22 pm

Results:
It still shows the same thing.
The following packages have unmet dependencies:
mosquitto : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
Current OS:
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

bullockbob
Posts: 6
Joined: Wed Aug 23, 2017 10:37 am

Re: STRECH and MQTT

Thu Aug 24, 2017 6:11 am

DougieLawson wrote:
Wed Aug 23, 2017 2:00 pm
Can you folks explain what part of viewtopic.php?p=1201759#p1199879 isn't working for you?
Hi there

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.

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: STRECH and MQTT

Thu Aug 24, 2017 11:35 am

So you'll need to report that to Roger Light on the Mosquitto mailing list.

https://mosquitto.org/support/
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

DirkS
Posts: 7639
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: STRECH and MQTT

Thu Aug 24, 2017 4:46 pm


bullockbob
Posts: 6
Joined: Wed Aug 23, 2017 10:37 am

Re: STRECH and MQTT

Mon Aug 28, 2017 1:59 am

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

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: STRECH and MQTT

Mon Aug 28, 2017 9:26 am

bullockbob wrote:
Mon Aug 28, 2017 1:59 am
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.
Yes. But only by installing it on Jessie and upgrading that to Stretch.

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.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

User avatar
topguy
Posts: 3597
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: STRECH and MQTT

Mon Aug 28, 2017 9:39 am

bullockbob wrote:
Mon Aug 28, 2017 1:59 am
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.

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.
Am I missing some detail in this discussion ?

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: STRECH and MQTT

Mon Aug 28, 2017 9:41 am

What version does that get? Is it 1.14? Does it have the websockets support?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

bullockbob
Posts: 6
Joined: Wed Aug 23, 2017 10:37 am

Re: STRECH and MQTT

Mon Aug 28, 2017 10:01 am

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.

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: STRECH and MQTT

Mon Aug 28, 2017 10:09 am

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.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

bullockbob
Posts: 6
Joined: Wed Aug 23, 2017 10:37 am

Re: STRECH and MQTT

Tue Aug 29, 2017 7:02 am

DougieLawson wrote:
Mon Aug 28, 2017 10:09 am
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.
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.

Thanks again. :)

Return to “Raspbian”

Who is online

Users browsing this forum: MadM4x and 31 guests