libmqic_r.so: cannot open shared object file: No such file or directory, python

Donia picture Donia · Dec 2, 2015 · Viewed 8.7k times · Source

I just created a VM vagrant with centos, installed python2.7 and pip using Miniconda, installed pymqi using pip, created a test python file to see if my pymqi installation is correct :

import pymqi
print "hello..."

but I got this :

[vagrant@localhost projects]$ python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
import pymqi
File "/home/vagrant/miniconda2/lib/python2.7/site-packages/pymqi/__init__.py", line 109, in <module>
import pymqe, CMQC, CMQCFC, CMQXC
ImportError: libmqic_r.so: cannot open shared object file: No such file or directory

I looked for that file :

[vagrant@localhost projects]$ find /opt/mqm/ -name 'libmqic_r.so'
/opt/mqm/lib/compat/libmqic_r.so
/opt/mqm/lib/libmqic_r.so
/opt/mqm/lib64/compat/libmqic_r.so
/opt/mqm/lib64/libmqic_r.so

Thank you, your help is appreciated.

Answer

Donia picture Donia · Dec 2, 2015

I found the solution :

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mqm/lib64