2

I am compiling my code with
g++ -std=c++11 -I /usr/local/include/opencv4/ recordVideo.cpp -L /usr/local/lib -lopencv_objdetect -lopencv_features2d -lopencv_imgproc -lopencv_highgui -lopencv_core -lopencv_videoio
I get error
error while loading shared libraries: libopencv_highgui.so.4.4: cannot open shared object file: No such file or directory
But it is present in /usr/local/lib
as libopencv_highgui.so.4.4
libopencv_highgui.so.4.4.0

1 Answer 1

3

solved using link https://github.com/cggos/dip_cvqt/issues/1

    Find the folder containing the shared library libopencv_core.so.3.2 using the following command line.

sudo find / -name "libopencv_core.so.3.2*"

Then I got the result: /usr/local/lib/libopencv_core.so.3.2.
2. Create a file called /etc/ld.so.conf.d/opencv.conf and write to it the path to the folder where the binary is stored.For example, I wrote /usr/local/lib/ to my opencv.conf file.
3. Run the command line as follows.

sudo ldconfig -v

    Try to run the test binary again.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.