Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 464
user1048839 Avatar asked Nov 30 '22 17:11

user1048839


1 Answers

Assuming you have installed the libraries to /usr/local/lib, which is the default, the correct answer is to run /sbin/ldconfig as root/sudo.

On some systems you will need to add /usr/local/lib to the paths that ld caches, e.g.

echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
like image 57
ralight Avatar answered Dec 06 '22 09:12

ralight