user1048839 user1048839 - 11 days ago 6
Linux Question

mosquitto_pub: error while loading shared libraries: libmosquitto.so.1: cannot open shared object file: No such file or directory

I encountered this problem when I compiled mosquitto on my Fedora 21 box from source.


mosquitto_pub: error while loading shared libraries:
libmosquitto.so.1: cannot open shared object file: No such file or
directory


The clients (i.e mosquitto_pub and mosquitto_sub) keep throwing that error even with reinstallation.

Answer

I fixed this problem with sysmlinks

$vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
include /usr/local/lib
/usr/lib
/usr/local/lib
$/sbin/ldconfig
$ln -s /usr/local/lib/libmosquitto.so.1 /usr/lib/libmosquitto.so.1