Darknet: OSError: libopencv_highgui.so.3.2: cannot open shared object file: No such file or directory

Created on 12 Dec 2019  ·  1Comment  ·  Source: pjreddie/darknet

I am a MacOS 10.14 user and opencv-contrib-python version is 4.1.2.30 , I tried to import Darknet on python in terminal the error message was
OSError: libopencv_highgui.so.3.2: cannot open shared object file: No such file or directory
But import cv2 works, so does that mean darknet did not connect to opencv?
And I tried @guerillagorilla 's solution, but it didn't work for me ( I have already changed the path into where my libopencv_highgui.so.3.2 is installed )

Here is how I tried to solve the problem by the solution above:
First,I tried to find where libopencv_highgui.so.3.2 is installed so I tried
find /usr | grep libopencv_highgui.so.3.2
Then here's the output
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2
So then I tried
sudo /bin/bash -c 'echo "/usr/lib/x86_64-linux-gnu/" > /etc/ld.so.conf.d/opencv.conf'
(Also I have also tried
sudo /bin/bash -c 'echo "/usr/lib/" > /etc/ld.so.conf.d/opencv.conf')
And
sudo ldconfig
I tried to import Darknet again after these steps, but I got the same error message again.

Most helpful comment

I have solved the same error with ubuntu 18.04 .

first,
vim ~/.bashrc
then, add the following in the last line .
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
at last,
source ~/.bashrc

>All comments

I have solved the same error with ubuntu 18.04 .

first,
vim ~/.bashrc
then, add the following in the last line .
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
at last,
source ~/.bashrc

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sujithm picture sujithm  ·  3Comments

arianaa30 picture arianaa30  ·  3Comments

TheHidden1 picture TheHidden1  ·  3Comments

kthordarson picture kthordarson  ·  3Comments

gpsmit picture gpsmit  ·  3Comments