Upgrade Mosquitto.. how? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
ilgrank2
Posts: 12
Joined: Fri Feb 23, 2018 10:52 am

Upgrade Mosquitto.. how?

Post by ilgrank2 »

Hello!
I've seen the version of mosquitto that comes with DietPi is rather old.. is there a way to upgrade it without breaking things?
Thanks :)

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: Upgrade Mosquitto.. how?

Post by Joulinar »

Hi,

many thanks for your request. Mosquitto is installed from Debian package liste via apt. The currently available version is 1.5.7. And that's the version that is being installed by DietPi.

Code: Select all

[email protected]:~# apt list mosquitto
Listing... Done
mosquitto/stable,now 1.5.7-1+deb10u1 armhf [installed]
[email protected]:~#
https://packages.debian.org/search?keyw ... ection=all
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

ilgrank2
Posts: 12
Joined: Fri Feb 23, 2018 10:52 am

Re: Upgrade Mosquitto.. how?

Post by ilgrank2 »

well.. not in my case at least: (output of dietpi-update follows)

Code: Select all

[  OK  ] DietPi-Update | No update required, your DietPi installation is already up to date:
[ INFO ] DietPi-Update | Current version : v6.30.0
[ INFO ] DietPi-Update | Latest version  : v6.30.0
[email protected]:~# apt list mosquitto
Listing... Done
mosquitto/oldstable,oldstable,now 1.4.10-3+deb9u4 amd64 [installed]
[email protected]:~#
and doind an

Code: Select all

apt update
followed by an

Code: Select all

apt list --upgradable
does list serveral packages, but among them there is not Mosquitto..
Last edited by ilgrank2 on Thu May 21, 2020 12:52 pm, edited 1 time in total.

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: Upgrade Mosquitto.. how?

Post by Joulinar »

You are running debian stretch?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

ilgrank2
Posts: 12
Joined: Fri Feb 23, 2018 10:52 am

Re: Upgrade Mosquitto.. how?

Post by ilgrank2 »

well, yes

Code: Select all

[email protected]:~# cat /etc/issue
Debian GNU/Linux 9 \n \l
all that I did was installing Dietpi long ago and keeping upgrading it using dietpi-update, so I remained as Stretch since there seems to be no easy way of upgrading without breaking things.

so 1.4.10 seems to be the latest installable version under Stretch? (Apt upgrade mosquitto tells me I'm on latest)

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: Upgrade Mosquitto.. how?

Post by Joulinar »

Yes, if you continue running stretch that's the latest version available.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

ilgrank2
Posts: 12
Joined: Fri Feb 23, 2018 10:52 am

Re: Upgrade Mosquitto.. how?

Post by ilgrank2 »

I'll leave this here for anyone having my same problem:
It is not mandatory to upgrade to Buster in order to use the latest Mosquitto (1.6.9 at the time of writing)

*warning* using the following procedure you will add an unofficial repo. I did it and everything seems to be fine but.. you're warned :)

just follow instructions here: https://mosquitto.org/blog/2013/01/mosq ... epository/
and in the last step do an

Code: Select all

apt upgrade mosquitto
followed by a

Code: Select all

service mosquitto restart
I needed 1.6.x because it has WebSockets compiled in (as opposed to previous releases which needed a recompile).
But if you need Websockets too, there's one last step:
add the following lines

Code: Select all

listener 9001
protocol websockets
to

Code: Select all

/etc/mosquitto/mosquitto.conf
then reastart the mosquitto service one more time.. and you're done! ;)
Last edited by ilgrank2 on Thu May 21, 2020 4:18 pm, edited 1 time in total.

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: Upgrade Mosquitto.. how?

Post by Joulinar »

Maybe you should have posted the disclaimer as well
It's worth repeating that this is experimental - there are package changes that haven't been vetted by a Debian developer so it's possible something will break. I've tested myself and had no problems so far.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

ilgrank2
Posts: 12
Joined: Fri Feb 23, 2018 10:52 am

Re: Upgrade Mosquitto.. how?

Post by ilgrank2 »

If I resorted to blindly posting just the commands needed to add the repo, then yes, I would agree with you.
But instead, I linked the page, where the warning is on the 4th row, before the actual commands.
That said, I updated my post 'cause.. better to be safe than sorry :)

Thanks :)

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: Upgrade Mosquitto.. how?

Post by Joulinar »

ok I marked your comment as solved 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

Post Reply