Issues with Mosquitto Install on Ubuntu 16.04 [SOLVED]

Ok I am very new at OpenHAB and I am following the Ubuntu Wiki instructions to the letter. I put the respository in to load it from the Software Center and tried to do it from command line but get the same response of the below. It is not loading the program because I cannot see the /etc/mosquitto directory. Any help would be great I have reloaded from scratch 8 times and same result each time.

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: libwebsockets3 (>= 1.2) but it is not installable
E: Unable to correct problems, you have held broken packages.

Ok after following some other site I purged mosquitto and any dependencies which it says was not installed. Then just went back through the way it say to install it and bang it worked… not sure what that heck happened.

What guide did you use to install Mosquitto to get it working, I would like to compare it to how I know it should be installed and then work out where the issue was sitting.

Thanks,
Sam.

Sorry for the late reply. I found out that I had to uninstall any instance of Mosquitto then followed the install guide for Ubuntu on the OpenHAB site.

I had the same issue installing mosquitto on ubuntu 16.04. I’m using a VM instead of Raspi.

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.

I downloaded the missing package (libwebsockets3 ) from https://pkgs.org/ubuntu-14.04/ubuntu-universe-amd64/libwebsockets3_1.2.2-1_amd64.deb.html

Please note it is for Ubuntu 14.04, I tried first installing the package libwebsockets7 for 16.04 but mosquito still ask for v3.

sudo wget https://pkgs.org/ubuntu-14.04/ubuntu-universe-amd64/libwebsockets3_1.2.2-1_amd64.deb.html

It downloaded the file to my home directory ( ~/root )
After that I installed the package:

sudo dpkg -i libwebsockets3_1.2.2-1_amd64.deb

And finally mosquito, that installed with no errors:

sudo apt-get install mosquitto mosquitto-clients

First test to use it give an error, but it seems much closer of having this solved

mosquitto_sub -d -t hello/world
Error: Connection refused

Too anxious to test it, I forgot to start the service. ;-(

It works fine after starting mosquito.

Soved for me, I hope it helps others

I have also same issue -
Ubuntu 16.04 LTS 32 bit

libwebsockets3_1.2.2-1_i386.deb for 14.04 LTS works for me…!!!