I'm using a Raspberry Pi with a Debian Wheezy image. I have installed Mosquitto (the broker of MQTT protocol), mosquitto client and python mosquitto to use mosquitto in my Python script, I have run a very simple example to test if all my packages work fine or not
import mosquitto
mqttc = mosquitto.Mosquitto("python_pub")
mqttc.will_set("/event/dropped", "Sorry, I seem to have died.")
mqttc.connect("127.0.0.1", 1883, 60, True)
mqttc.publish("hello/world", "Hello, World!")
For some reason I get the following error though.
Traceback (most recent call last):
File "test_1.py", line 1, in <module>
import mosquitto
File "/usr/lib/pymodules/python2.7/mosquitto.py", line 484, in <module>
_mosquitto_log_init = _libmosq.mosquitto_log_init
File "/usr/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libmosquitto.so.1: undefined symbol: mosquitto_log
Can somebody explain why this isn't working and a possible solution.