ImportError: libjpeg.so.9

2.2k views Asked by At

I have installed opencv in ubuntu. Now, when I am importing cv2, there is an error

'ImportError: libjpeg.so.9: cannot open shared object file: No such file or directory'

How to fix the error ? I have already searched net and tried some but couldn't resolve the error.

I have also tried the following :

sudo apt-get install libjpeg9

The following is the output :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libjpeg9

Thanks..

1

There are 1 answers

1
Ahmed Masud On

For whatever reason your version of OpenCV has been oucompiled against http://ijg.org/files/jpegsrc.v9b.tar.gz ... Either you should also compile and instlal that or you can recompile opencv with libraries that are on your system.