0

I am a complete beginner with Ubuntu and Mosquitto.

I've tried this and this tutorial. But I ended with libwebsocket3 is not installed. After that I realized that apt-get libwebsockets3 is not OK for 16.04 which is for 14.04 LTS.

What is the solution for 16.04?

Ismail Yavuz
  • 131
  • 1
  • 9

1 Answers1

0

The official method for Mosquitto on Ubuntu is:

  • sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
  • sudo apt-get update
  • sudo apt-get install mosquitto

Sources:

  1. https://mosquitto.org/download/
  2. https://launchpad.net/~mosquitto-dev/+archive/ubuntu/mosquitto-ppa
AnotherKiwiGuy
  • 4,350
  • 1
  • 20
  • 38
  • Will I have websockets support? – Ismail Yavuz Nov 29 '16 at 20:30
  • Here is my error messages: 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: libwebsockets3 (>= 1.2) but it is not installable E: Unable to correct problems, you have held broken packages. – Ismail Yavuz Nov 29 '16 at 20:32
  • 1
    According to https://mosquitto.org/man/mosquitto-conf-5.html, it's inherent. It comes down to your server setup, not Mosquitto. Mosquitto already supports it, and is an allowable protocol in the conf. But it the environment doesn't support it, then it wont work. – AnotherKiwiGuy Nov 29 '16 at 20:33
  • If you have held or broken packages, that's to do with apt, and you need to resolve that before you proceed. – AnotherKiwiGuy Nov 29 '16 at 20:33
  • Is there a way to install libwebsockets3 on Ubuntu 16.04? – Ismail Yavuz Nov 29 '16 at 20:40
  • 1
    Assuming you're using Ubuntu 16.04 64bit: You can get the deb file here: http://launchpadlibrarian.net/141030801/libwebsockets3_1.2.2-1_amd64.deb – AnotherKiwiGuy Nov 29 '16 at 21:07
  • @ThatGuy I installed websockets but it doesnt work, Is there something im missing? – david Apr 07 '17 at 02:32
  • 1
    @david - Websockets is not something you install, it's a protocol that is handled. You can find out more about the protocol [here](https://en.wikipedia.org/wiki/WebSocket) – AnotherKiwiGuy Apr 07 '17 at 03:05
  • @ThatGuy ok that makes sense, anyway i tried adding 'WITH_WEBSOCKETS:=yes' to my mosquitto broker `config.mk`, and reinstalled the broker. but i cant make it to work still the error persist. – david Apr 07 '17 at 03:22
  • @david - I would say that it would be best to start a new question, rather than adding to this one. The reason is that you've not stated what the error you're receiving is, and it may not be related to the issue the OP was having. – AnotherKiwiGuy Apr 07 '17 at 03:26