eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.66k stars 2.34k forks source link

Raspbian Stretch install error #529

Closed Obo666 closed 6 years ago

Obo666 commented 6 years ago

Issue: cannot install Mosquitto under Raspbian Stretch, following instructions at https://mosquitto.org/2013/01/mosquitto-debian-repository/ with http://repo.mosquitto.org/debian/mosquitto-stretch.list

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

hemantkamalakar commented 6 years ago

I am facing the same issue. 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.

Obo666 commented 6 years ago

Yeah, I think quite a few people are. Appears to be a bit of a show stopper. Hopefully a response will be forthcoming.

VitaliyZn commented 6 years ago

Same problem(((

UriWise commented 6 years ago

Same here :(

pauloreal1 commented 6 years ago

one more here. same problem in stretch

pcmaik commented 6 years ago

Same problem :(

szmolnar commented 6 years ago

same issue :-(

puytr commented 6 years ago

Same problem :-( Did a clean install twice, to no avail.

kuradi commented 6 years ago

+1

maddhin commented 6 years ago

same issue:(

cflurin commented 6 years ago

have a look here: https://www.raspberrypi.org/forums/viewtopic.php?t=191027

... build from source

MikePRoberts commented 6 years ago

Is this linked to Debian Stretch dropping SSH1- and hence a broader Linux issue? See https://www.debian.org/releases/stable/i386/release-notes/ch-information.en.html

shubhamt619 commented 6 years ago

It works..Everything is working after i used aptitude

shubhamt619 commented 6 years ago

https://www.raspberrypi.org/forums/viewtopic.php?t=191027#p1203764

MikePRoberts commented 6 years ago

Thank you for your quick reply.

A reply on the forum link below suggests that the problem would be solved by your updating your dependency list. Doing this would enable a load of people using the Pi for IoT and to load Mosquitto the normal way. Could you do this?

Thank you

Mike

From: Shubham Thakur Sent: Friday, September 8, 2017 7:54 AM To: eclipse/mosquitto Cc: Mike Roberts ; Comment Subject: Re: [eclipse/mosquitto] Raspbian Stretch install error (#529)

https://www.raspberrypi.org/forums/viewtopic.php?t=191027#p1203764

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

spacemishka commented 6 years ago

same here. Could u fix it for Debian Stretch?

Thanks

nmaas87 commented 6 years ago

would be awesome, thanks a lot!

aniketdali commented 6 years ago

I tried this to fix it wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u6_armhf.deb sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u6_armhf.deb

tmofoshodo commented 6 years ago

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.

aniketdali's comment above will fix the libssl1.0.0 error... but libwebsockets3 is still not installable.

davyike commented 6 years ago

Hi all, following aniketdali's tip I've used the following to install on Raspberry Pi with Debian Stretch:

cd ~
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-stretch.list
sudo apt-get update

cd ~
wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u6_armhf.deb
sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u6_armhf.deb
wget http://ftp.nz.debian.org/debian/pool/main/libw/libwebsockets/libwebsockets3_1.2.2-1_armhf.deb
sudo dpkg -i libwebsockets3_1.2.2-1_armhf.deb
sudo apt-get install mosquitto mosquitto-clients
BITRU commented 6 years ago

davyike thank you! worked.

tmofoshodo commented 6 years ago

@davyike what model raspberry pi are you using?

davyike commented 6 years ago

@tmofoshodo I'm using a Pi 3 Model B. Don't think that should matter as much as the Raspbian image though, I am using the latest Raspbian Stretch Lite, release date 2017-09-07.

tmofoshodo commented 6 years ago

@davyike Thanks for the reply. I am using a Pi Zero W. Your steps allowed me to install Mosquitto, but I get "Illegal Instruction" when I try to run it. I'm thinking it might be because Pi Zero W uses ARMv6. I am going to try on my Pi 3 tonight.

davyike commented 6 years ago

@tmofoshodo Ah good point. Yes you may need the armel version instead of the armhf version? I'm not very familiar with that though so do your own research. You can see all the packages here: https://packages.debian.org/jessie/libwebsockets3 Same would apply for openssl: https://packages.debian.org/stretch/openssl Looking at that I see there's a much newer version of OpenSSL than I'd referenced earlier.

If you can confirm that it's needing armel then the following packages should work (you'll want to uninstall the other ones first of course):

http://http.us.debian.org/debian/pool/main/o/openssl/openssl_1.1.0f-3_armel.deb
http://http.us.debian.org/debian/pool/main/libw/libwebsockets/libwebsockets3_1.2.2-1_armel.deb

Let me know if you have any luck with that. There's probably a tidier way to do this than installing packages directly, i.e. by installing newer Debian apt-get lists or something but I'm not sure how that would work. I think this is tidier than compiling and installing from source anyway.

jahnroux commented 6 years ago

@davyike I am having the same issue on my Pi Zero W. I am running stretch on my Pi 2 and on my Pi Zero W. I am able to use the work around of manually installing libssl and libwensockets3 for the Pi 2 and I can get mqtt running. However, the same process on the Pi Zero W causes me to get the error message:

pi@raspberrypizero:~ $ mosquitto
Illegal instruction

I have uninstalled, reinstalled, updated, rebooted, you name it. I can't get mqtt to run on a pi zero under stretch. I may have to reinstall with Jessie tonight.

maddhin commented 6 years ago

@jahnroux: did you try davyike's fix w/ the armel packages just one post above?

jahnroux commented 6 years ago

@maddhin yes, see below:

pi@raspberrypizero:~ $ sudo dpkg -i libwebsockets3_1.2.2-1_armel.deb
dpkg: error processing archive libwebsockets3_1.2.2-1_armel.deb (--install):
 package architecture (armel) does not match system (armhf)
Errors were encountered while processing:
 libwebsockets3_1.2.2-1_armel.deb
pi@raspberrypizero:~ $

armel is not compatible with the Pi Zero architecture. I also tried libssl-armel, openssl-armel, all the same issue.

davyike commented 6 years ago

@jahnroux It looks like that error message is telling you that you should be using armhf packages, in which case go back to my earlier post. I'm not 100% sure on which Pi models have which architecture, so that exercise is left to the reader :)

Edit: Re-reading your comments, so you're saying that armel doesn't install, and that armhf gives an Illegal instruction response?

jahnroux commented 6 years ago

@davyike that is what I am trying to explain, your earlier approach works for my Pi 2, not my Pi Zero. Both the 2 and zero are running stretch. So I am able to install the armhf libssl and libwebsocket3 packages but mosquitto will not start on my Pi Zero. On the Pi 2 I was able to install and get mosquitto running.

davyike commented 6 years ago

@jahnroux I see, sorry I misunderstood earlier. I don't have a Pi Zero so am not able to play around and try that. I wonder if @tmofoshodo had any luck? Perhaps it's not the OpenSSL and Websocket3 packages that have the problem, maybe it's the Mosquitto package? Just throwing some ideas out there. If there's a way for you to verify if the OpenSSL and Websocket3 libraries are working, independently from Mosquitto, that would be a good first step.

jahnroux commented 6 years ago

@davyike thanks, yeah I don't expect you to solve my problem, I just wanted to let it be known that I ran into the same issue as @tmofoshodo

I will hack together something tonight to test the packages interdependently before I reinstall with Jessie.

jipp commented 6 years ago

Hi

I ran into the same issue. it looks like that stretch has libssl 1.0.2 installed by default. libwebsockets3 is not available at all.

I'm not a developer but I see a libwebsockets8 library available on stretch

one way around would be to add the jessie sources in the /etc/apt/sources.list.d/ folder - but then I get a mixture of stretch and jessi on the system - which I would like to avoid.

I'm a little clueless now as from the libs I would suggest that libssl is a broken dependency which needsto be removed for mosquitto on Stretch. For libwebsockets I cannot judge how much effort it would be to update to a new websocket lib.

sevos commented 6 years ago

This worked for me:

wget http://ftp.us.debian.org/debian/pool/main/libw/libwebsockets/libwebsockets3_1.2.2-1_armhf.deb
wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl1.0.0_1.0.2l-1~bpo8+1_armhf.deb
sudo dpkg -i libwebsockets3_1.2.2-1_armhf.deb
sudo dpkg -i libssl1.0.0_1.0.2l-1~bpo8+1_armhf.deb

# If dpkg reported any packages missing, I used apt-get to get them from stretch repo

sudo apt-get install mosquitto

I understand that this mixes stretch and jessie libs and is not kosher, but works for now. Someone may use it.

srutib commented 6 years ago

I am running into the same problems as @jahnroux and @tmofoshodo. I keep receiving illegal instruction whenever I try to run mosquitto. I also tried @sevos solution, but still get the same illegal instruction problem.

Has anyone been able to successfully fix this problem?

artreaktor commented 6 years ago

@sevos workaround fixed the issue for me pi@pi1:~ $ cat /etc/*-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)"

ThomDietrich commented 6 years ago

@ralight an official statement by the maintainers regarding this issue would be interesting. It seems like a rather important one to sort out - as the comments have shown... Is anyone looking into a solution or can you give a few details about the challenges? What are the next steps? Very much appreciated! Thanks

Edit: One month has passed without any response, despite the seriousness of the matter. This is quite disappointing.

Cancelor commented 6 years ago

https://www.eclipse.org/forums/index.php?t=msg&th=1089302&goto=1773991&

schaumannj commented 6 years ago

+1 Dear authors, could you please release ore rebuild the mosquitto with new open SSL library to prevent the security risk in version 1.0.0. Thank you in advance Jan

kostousov-ds commented 6 years ago

https://www.eclipse.org/forums/index.php?t=msg&th=1089302&goto=1773991&

doesn't work

root@pi1:/tmp/mosquitto# mosquitto v
mosquitto: /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0: version `OPENSSL_1.0.0' not found (required by mosquitto)
mosquitto: /usr/lib/arm-linux-gnueabihf/libssl.so.1.0.0: version `OPENSSL_1.0.1' not found (required by mosquitto)
mosquitto: /usr/lib/arm-linux-gnueabihf/libssl.so.1.0.0: version `OPENSSL_1.0.0' not found (required by mosquitto)
consolacion commented 6 years ago

I only came upon this discussion after I managed to install it. this is what I did (after I got the unmet dependencies error):

sudo aptitude install mosquitto

That presented me with options to "solve it" mosquittosolve the first choice i cose 'n', as it would leave the situation intact. Then I got the option to install the unmet dependencies, for which I chose 'Y'

That did it for me

s-hemer commented 6 years ago

But this installs just the version available in the standard Raspbian repository. Funny enough that the package there has the correct dependencies whereas the one from http://repo.mosquitto.org/debian stretch main still depends on libwebsockets3

consolacion commented 6 years ago

yes, correct. But in the end I cared more about having an installable 'old' version than a non installable 'new version' makes one wonder, wouldnt anybody have tried installing it on stretch before releasing it into thatrepository?

Dan-in-CA commented 6 years ago

It is really not that hard to build mosquitto from source on raspbian stretch. See this post: https://xperimentia.com/2015/08/20/installing-mosquitto-mqtt-broker-on-raspberry-pi-with-websockets/

If you are building on a Raspi with a quad core processor it does not take long either.

consolacion commented 6 years ago

Thanks, I will check that out. When i did my 'solution' I only discovered afterwards that it installed a previous mosquitto distribution, but I didnt really mind. Nevertheless, I´ll give the link a try

rogertheriault commented 6 years ago

@Dan-in-CA thanks - your step by step instructions worked for me (Pi 3, stretch). Reminds me of the days when "make" was really the only option on unix/linux.

Dan-in-CA commented 6 years ago

@rogertheriault, Thanks for the feedback. Looks like the post is getting a lot of traffic but this is the first report of results.

rogertheriault commented 6 years ago

@Dan-in-CA that's possibly originating here, that's where I started. Though, compared to his video, my Pi wasn't dusty, it was a newly minted Stretch... (tho I do have some dusty units) http://bitluni.net/simple-mqtt-broker-setup-on-a-raspberry-pi/

borch84 commented 6 years ago

@Dan-in-CA I confirm I was able to install mosquitto using the instructions provided for raspbian stretch

jahnroux commented 6 years ago

Has anyone tried the solution in Raspberry Pi Zero W?